Commit 5054ecca authored by JC Brand's avatar JC Brand

Check whether controlbox exists before assigning

parent f387c947
......@@ -97,9 +97,7 @@ converse.plugins.add('converse-muc-views', {
});
Object.assign(_converse.ControlBoxView.prototype, {
renderRoomsPanel () {
function renderRoomsPanel () {
if (this.roomspanel && u.isVisible(this.roomspanel.el)) {
return;
}
......@@ -122,7 +120,9 @@ converse.plugins.add('converse-muc-views', {
*/
_converse.api.trigger('roomsPanelRendered');
}
});
if (_converse.ControlBoxView) {
Object.assign(_converse.ControlBoxView.prototype, { renderRoomsPanel });
}
function ___ (str) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment