Explorar el Código

Bugfix. If controlbox is not there, undefined is returned.:wq

JC Brand hace 9 años
padre
commit
70f1570984
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/converse-muc.js

+ 3 - 3
src/converse-muc.js

@@ -214,9 +214,9 @@
                 },
 
                 insertIntoDOM: function () {
-                    var $cbox = converse.chatboxviews.get("controlbox").$el;
-                    if ($cbox.length) {
-                        this.$el.insertAfter($cbox);
+                    var view = converse.chatboxviews.get("controlbox");
+                    if (view) {
+                        this.$el.insertAfter(view.$el);
                     } else {
                         $('#conversejs').prepend(this.$el);
                     }