diff --git a/e107_files/jslib/core/dialog.js b/e107_files/jslib/core/dialog.js index 282999de2..5a004fd9d 100644 --- a/e107_files/jslib/core/dialog.js +++ b/e107_files/jslib/core/dialog.js @@ -303,7 +303,7 @@ e107Widgets.Dialog = Class.create(e107WidgetAbstract, { this.visible = true; new PeriodicalExecuter(function(executer) { - if (!this.element.visible()) + if (this.element && !this.element.visible()) return; this.fire('shown'); executer.stop(); @@ -330,7 +330,7 @@ e107Widgets.Dialog = Class.create(e107WidgetAbstract, { } new PeriodicalExecuter(function(executer) { - if (this.element.visible()) + if (this.element && this.element.visible()) return; this.visible = false; this.element.remove();