diff --git a/converse.js b/converse.js index 8a92da85c..4839ae3a3 100644 --- a/converse.js +++ b/converse.js @@ -43,6 +43,7 @@ define([ "Libraries/burry.js/burry", "Libraries/underscore.string", + "Libraries/jquery-ui-1.9.1.custom", "Libraries/sjcl", "Libraries/backbone", "Libraries/strophe.muc", @@ -1693,14 +1694,18 @@ }, this)); // Controlbox toggler - $toggle.bind('click', $.proxy(function (e) { - e.preventDefault(); - if ($("div#controlbox").is(':visible')) { - this.chatboxesview.closeChat('controlbox'); - } else { - this.chatboxesview.openChat('controlbox'); - } - }, this)); + if ($toggle.length) { + $toggle.bind('click', $.proxy(function (e) { + e.preventDefault(); + if ($("div#controlbox").is(':visible')) { + this.chatboxesview.closeChat('controlbox'); + } else { + this.chatboxesview.openChat('controlbox'); + } + }, this)); + } else { + this.chatboxesview.openChat('controlbox'); + } }, this)); }, xmppchat)); })); diff --git a/index.html b/index.html index b527914e4..54ebd4d65 100644 --- a/index.html +++ b/index.html @@ -3,22 +3,22 @@