Commit a16c0683 authored by JC Brand's avatar JC Brand

Bugfix. Handle `null` passed in as `attrs` to `api.rooms.create`

parent 168f29cf
...@@ -2094,12 +2094,8 @@ converse.plugins.add('converse-muc', { ...@@ -2094,12 +2094,8 @@ converse.plugins.add('converse-muc', {
* JIDs of the chatroom(s) to create * JIDs of the chatroom(s) to create
* @param {object} [attrs] attrs The room attributes * @param {object} [attrs] attrs The room attributes
*/ */
create (jids, attrs) { create (jids, attrs={}) {
if (_.isString(attrs)) { attrs = _.isString(attrs) ? {'nick': attrs} : (attrs || {});
attrs = {'nick': attrs};
} else if (_.isUndefined(attrs)) {
attrs = {};
}
if (_.isUndefined(attrs.maximize)) { if (_.isUndefined(attrs.maximize)) {
attrs.maximize = false; attrs.maximize = false;
} }
......
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