diff --git a/src/headless/converse-muc.js b/src/headless/converse-muc.js index c2666822c..8eea2725d 100644 --- a/src/headless/converse-muc.js +++ b/src/headless/converse-muc.js @@ -2094,12 +2094,8 @@ converse.plugins.add('converse-muc', { * JIDs of the chatroom(s) to create * @param {object} [attrs] attrs The room attributes */ - create (jids, attrs) { - if (_.isString(attrs)) { - attrs = {'nick': attrs}; - } else if (_.isUndefined(attrs)) { - attrs = {}; - } + create (jids, attrs={}) { + attrs = _.isString(attrs) ? {'nick': attrs} : (attrs || {}); if (_.isUndefined(attrs.maximize)) { attrs.maximize = false; }