Explorar o código

Use `findWhere` when looking for only one instance

JC Brand %!s(int64=6) %!d(string=hai) anos
pai
achega
63d258a00a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/headless/converse-muc.js

+ 2 - 2
src/headless/converse-muc.js

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