fixed "can not access attribute 0 of undefined" caused by automatic nextmatch refresh loosing context

This commit is contained in:
Ralf Becker 2014-01-27 16:26:00 +00:00
parent c52c1f7126
commit ba5254040d

View File

@ -1268,7 +1268,6 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
} }
// Start / update timer // Start / update timer
var self = this;
if (this._autorefresh_timer) if (this._autorefresh_timer)
{ {
window.clearInterval(this._autorefresh_timer); window.clearInterval(this._autorefresh_timer);
@ -1276,7 +1275,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
} }
if(time > 0) if(time > 0)
{ {
this._autorefresh_timer = setInterval(function() {self.refresh();}, time * 1000); this._autorefresh_timer = setInterval(jQuery.proxy(this.refresh, this), time * 1000);
} }
}, },