Janus_Use_RTSP_REstream is a checkbox, and so doesn't have length.

pull/4140/head
Isaac Connor 2024-10-06 20:02:28 -04:00
parent 91e31d91bc
commit a140754eb1
1 changed files with 2 additions and 5 deletions

View File

@ -308,11 +308,8 @@ function initPage() {
});
const Janus_Use_RTSP_Restream = form.elements['newMonitor[Janus_Use_RTSP_Restream]'];
if (Janus_Use_RTSP_Restream.length) {
Janus_Use_RTSP_Restream[0].onclick = Janus_Use_RTSP_Restream_onclick;
console.log("Setup Janus_RTSP_Restream.onclick");
} else {
console.log("newMonitor[Janus_Use_RTSP_Restream] not found");
if (Janus_Use_RTSP_Restream) {
Janus_Use_RTSP_Restream.onclick = Janus_Use_RTSP_Restream_onclick;
}
}