Skip to content

Commit

Permalink
fix node value
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Aug 7, 2024
1 parent f2aed2c commit 654f9e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions static/js/audiorecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ function handleModeChange() {

function updateAudio() {
var data: any = {};
data["audio-mode"] = document.getElementById("audio-mode-select")?.nodeValue;
data["audio-mode"] = (
document.getElementById("audio-mode-select") as HTMLSelectElement
).value;

var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", "/api/audiorecording", true);
Expand All @@ -157,7 +159,8 @@ function updateAudio() {
xmlHttp.onload = async function () {
if (xmlHttp.status == 200) {
if (
document.getElementById("audio-mode-select")?.nodeValue != "Disabled"
(document.getElementById("audio-mode-select") as HTMLSelectElement)
.value != "Disabled"
) {
document
.getElementById("audio-test-button")
Expand Down

0 comments on commit 654f9e9

Please sign in to comment.