From 470739e1d5f5f3594afe7355aa60a44d8918efae Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 9 Feb 2021 14:24:09 -0500 Subject: [PATCH] Add debugging if streamStatus.status doesn't exist --- web/skins/classic/views/js/event.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index 4f0ccb355..b6d935215 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -243,7 +243,7 @@ function changeRate() { setCookie('zmEventRate', rate, 3600); } // end function changeRate -function getCmdResponse( respObj, respText ) { +function getCmdResponse(respObj, respText) { if ( checkStreamForErrors('getCmdResponse', respObj) ) { console.log('Got an error from getCmdResponse'); console.log(respObj); @@ -259,7 +259,11 @@ function getCmdResponse( respObj, respText ) { } streamStatus = respObj.status; - if ( streamStatus.duration && ( streamStatus.duration != parseFloat(eventData.Length) ) ) { + if (!streamStatus) { + console.log('No status in respObj'); + console.log(respObj); + return; + } else if ( streamStatus.duration && ( streamStatus.duration != parseFloat(eventData.Length) ) ) { eventData.Length = streamStatus.duration; } if ( streamStatus.progress > parseFloat(eventData.Length) ) { @@ -573,8 +577,8 @@ function getEventResponse(respObj, respText) { $j('#dataEventId').text( eventData.Id ); $j('#dataEventName').text( eventData.Name ); - $j('#dataMonitorId').text( eventData.MonitorId ); - $j('#dataMonitorName').text( eventData.MonitorName ); + $j('#dataMonitorId').text(''+eventData.MonitorId+''); + $j('#dataMonitorName').text(''+eventData.MonitorName+''); $j('#dataCause').text( eventData.Cause ); if ( eventData.Notes ) { $j('#dataCause').prop( 'title', eventData.Notes );