Bugfix. Handle null
passed in as attrs
to api.rooms.create
This commit is contained in:
parent
168f29cf06
commit
a16c068313
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user