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

This commit is contained in:
Isaac Connor 2022-02-03 14:46:39 -05:00
parent 7515711eb8
commit 7a95aa7210
1 changed files with 4 additions and 1 deletions

View File

@ -203,7 +203,10 @@ function changeScale() {
streamScale(scale == '0' ? autoScale : scale); streamScale(scale == '0' ? autoScale : scale);
drawProgressBar(); 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); setCookie('zmEventScale'+eventData.MonitorId, scale, 3600);
// After a resize, check if we still have room to display the event stats table // After a resize, check if we still have room to display the event stats table