Procházet zdrojové kódy

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

JC Brand před 4 roky
rodič
revize
543cf9066a
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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;
         },