From e85078ca2d0788d8b6e6ba09b14ee26c1f292638 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 11 Jun 2024 14:00:01 -0400 Subject: [PATCH] Handle when ptzToggle does not exist because OPT_CONTROL is off --- web/skins/classic/views/js/watch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 62f425bedf..f4eccc5d5c 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -1064,6 +1064,10 @@ function streamReStart(oldId, newId) { function applyMonitorControllable(currentMonitor) { const ptzToggle = document.getElementById('ptzToggle'); + if (!ptzToggle) { + console.log('ptz toggle is not present. Likely OPT_CONTROL is off'); + return; + } if (currentMonitor.monitorControllable) { const ptzShow = getCookie('ptzShow');