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

This commit is contained in:
JC Brand 2020-05-18 18:51:40 +02:00
parent bf4b3efa5b
commit 1e44f45a68

View File

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