소스 검색

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;
         },