mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-30 18:49:08 +01:00
Handle missing nextmatch controller when setting up auto-refresh by trying again later.
(Missing controller caused by new template loading)
This commit is contained in:
parent
f18dd19536
commit
6feb9f468a
@ -2348,6 +2348,12 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
}
|
||||
if(time > 0)
|
||||
{
|
||||
if(!this.controller)
|
||||
{
|
||||
// Controller is not ready yet, come back later
|
||||
setTimeout(() => {this._set_autorefresh(time)}, 1000);
|
||||
return;
|
||||
}
|
||||
this._autorefresh_timer = setInterval(jQuery.proxy(this.controller.update, this.controller), time * 1000);
|
||||
|
||||
// Bind to tab show/hide events, so that we don't bother refreshing in the background
|
||||
|
Loading…
Reference in New Issue
Block a user