From 70f15709847d4a8ac75f22f13cca88614f818521 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 16 Jun 2016 17:15:27 +0200 Subject: [PATCH] Bugfix. If controlbox is not there, undefined is returned.:wq --- src/converse-muc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/converse-muc.js b/src/converse-muc.js index 7d7a4b18a..50e2b2218 100755 --- a/src/converse-muc.js +++ b/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); }