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

This commit is contained in:
JC Brand 2016-06-16 17:15:27 +02:00
parent 70135ba070
commit 70f1570984

View File

@ -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);
}