Use findWhere
when looking for only one instance
This commit is contained in:
parent
bb94891621
commit
63d258a00a
@ -1811,9 +1811,9 @@ converse.plugins.add('converse-muc', {
|
||||
*/
|
||||
const jid = Strophe.getBareJidFromJid(data.jid);
|
||||
if (jid !== null) {
|
||||
return this.where({'jid': jid}).pop();
|
||||
return this.findWhere({'jid': jid});
|
||||
} else {
|
||||
return this.where({'nick': data.nick}).pop();
|
||||
return this.findWhere({'nick': data.nick});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user