Commit 63d258a0 authored by JC Brand's avatar JC Brand

Use `findWhere` when looking for only one instance

parent bb948916
......@@ -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});
}
}
});
......
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