Minor fix
authorAlexander Ebert <ebert@woltlab.com>
Wed, 21 Jan 2015 00:23:59 +0000 (01:23 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 21 Jan 2015 00:23:59 +0000 (01:23 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 6e752f255cc0caa9d99d54bd7236d127921c44dd..950ccdf3760f5ac57cc8e208cc1162d8edde4e0c 100644 (file)
@@ -892,11 +892,13 @@ RedactorPlugins.wmonkeypatch = function() {
                                        // ignore
                                }
                                finally {
-                                       var $container = this.modal.dialog.parents('.dialogContainer:eq(0)');
-                                       if ($container.length) {
-                                               setTimeout(function() {
-                                                       $container.remove();
-                                               }, 500);
+                                       if (this.modal.dialog) {
+                                               var $container = this.modal.dialog.parents('.dialogContainer:eq(0)');
+                                               if ($container.length) {
+                                                       setTimeout(function() {
+                                                               $container.remove();
+                                                       }, 500);
+                                               }
                                        }
                                }