From 11bc2d76828f7c2f041e64d64e991da638a80e26 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sun, 10 Jan 2021 14:21:52 -0600 Subject: [PATCH] bind this to streamCmdQuery --- web/js/MonitorStream.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index c78fbc496..0dc19f2d6 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -36,7 +36,7 @@ function MonitorStream(monitorData) { stream.src = ''; stream.src = src; } - setTimeout(this.streamCmdQuery, delay, this); + setTimeout(this.streamCmdQuery.bind(this), delay); }; this.stop = function() { if ( 0 ) { @@ -98,7 +98,7 @@ function MonitorStream(monitorData) { }; this.onFailure = function(jqxhr, textStatus, error) { - setTimeout(this.streamCmdQuery, 1000*statusRefreshTimeout, this); + setTimeout(this.streamCmdQuery.bind(this), 1000*statusRefreshTimeout); logAjaxFail(jqxhr, textStatus, error); }; @@ -195,7 +195,7 @@ function MonitorStream(monitorData) { } // end if Ok or not this.lastAlarmState = this.alarmState; - setTimeout(this.streamCmdQuery, statusRefreshTimeout, this); + setTimeout(this.streamCmdQuery.bind(this), statusRefreshTimeout); }; this.streamCmdQuery = function(resent) {