Explorar o código

Bugfix. `TypeError: cannot read property 'length' of undefined`

JC Brand %!s(int64=4) %!d(string=hai) anos
pai
achega
543cf9066a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/headless/plugins/disco/api.js

+ 1 - 1
src/headless/plugins/disco/api.js

@@ -287,7 +287,7 @@ export default {
          * }
          */
         async supports (feature, jid) {
-            const features = await api.disco.features.get(feature, jid);
+            const features = await api.disco.features.get(feature, jid) || [];
             return features.length > 0;
         },