mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Prevent endless PeriodicalExecuter
This commit is contained in:
@@ -303,7 +303,7 @@ e107Widgets.Dialog = Class.create(e107WidgetAbstract, {
|
|||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
new PeriodicalExecuter(function(executer) {
|
new PeriodicalExecuter(function(executer) {
|
||||||
if (!this.element.visible())
|
if (this.element && !this.element.visible())
|
||||||
return;
|
return;
|
||||||
this.fire('shown');
|
this.fire('shown');
|
||||||
executer.stop();
|
executer.stop();
|
||||||
@@ -330,7 +330,7 @@ e107Widgets.Dialog = Class.create(e107WidgetAbstract, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
new PeriodicalExecuter(function(executer) {
|
new PeriodicalExecuter(function(executer) {
|
||||||
if (this.element.visible())
|
if (this.element && this.element.visible())
|
||||||
return;
|
return;
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.element.remove();
|
this.element.remove();
|
||||||
|
Reference in New Issue
Block a user