1
0
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:
secretr
2012-04-11 09:47:32 +00:00
parent 1eb4d91fdc
commit f7e5d97081

View File

@@ -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();