Browse Source

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

JC Brand 9 years ago
parent
commit
70f1570984
1 changed files with 3 additions and 3 deletions
  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);
                     }