Commit 01f0a652 authored by JC Brand's avatar JC Brand

Reject the `waitUntilFeaturesDiscovered` promise if query failed

No code relies on this currently, but it's seems the right thing to do
parent 96f38150
......@@ -64702,7 +64702,7 @@ _converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins.add('converse-dis
const stanza = await _converse.api.disco.info(this.get('jid'), null);
this.onInfo(stanza);
} catch (iq) {
this.waitUntilFeaturesDiscovered.resolve(this);
this.waitUntilFeaturesDiscovered.reject(iq);
_converse.log(iq, Strophe.LogLevel.ERROR);
}
......@@ -130,8 +130,8 @@ converse.plugins.add('converse-disco', {
try {
const stanza = await _converse.api.disco.info(this.get('jid'), null);
this.onInfo(stanza);
} catch(iq) {
this.waitUntilFeaturesDiscovered.resolve(this);
} catch (iq) {
this.waitUntilFeaturesDiscovered.reject(iq);
_converse.log(iq, Strophe.LogLevel.ERROR);
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment