瀏覽代碼

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

JC Brand 4 年之前
父節點
當前提交
543cf9066a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
         },