Browse Source

core: Don't expect Strophe.BOSH to be defined

JC Brand 5 năm trước cách đây
mục cha
commit
1e44f45a68
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/headless/converse-core.js

+ 1 - 1
src/headless/converse-core.js

@@ -399,7 +399,7 @@ export const api = _converse.api = {
             if (type.toLowerCase() === 'websocket') {
                 return _converse.connection._proto instanceof Strophe.Websocket;
             } else if (type.toLowerCase() === 'bosh') {
-                return _converse.connection._proto instanceof Strophe.Bosh;
+                return Strophe.BOSH && _converse.connection._proto instanceof Strophe.Bosh;
             }
         }
     },