From 7a95aa7210e0484b29b917ddc1792cbce6933eb9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 3 Feb 2022 14:46:39 -0500 Subject: [PATCH] Don't render cues if we don't have any. This occurs on initial load we call changeScale which would re-render the cues but the cur ajax hasn't completed yet, so this just avoids an error being logged --- web/skins/classic/views/js/event.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index ac05f51fe..31363e154 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -203,7 +203,10 @@ function changeScale() { streamScale(scale == '0' ? autoScale : scale); drawProgressBar(); } - alarmCue.html(renderAlarmCues(eventViewer));//just re-render alarmCues. skip ajax call + if (cueFrames) { + //just re-render alarmCues. skip ajax call + alarmCue.html(renderAlarmCues(eventViewer)); + } setCookie('zmEventScale'+eventData.MonitorId, scale, 3600); // After a resize, check if we still have room to display the event stats table