Commit ac007bb5 authored by JC Brand's avatar JC Brand

converse-disco: don't replace a pending promise

I'm not sure how much this is an issue outside of tests, where we might
run into race conditions arising to the fact that we don't always
respond to every IQ stanza
parent c5309f92
......@@ -566,7 +566,7 @@ converse.plugins.add('converse-disco', {
* @namespace _converse.api.disco.features
* @memberOf _converse.api.disco
*/
'features': {
features: {
/**
* Return a given feature of a disco entity
*
......@@ -642,7 +642,9 @@ converse.plugins.add('converse-disco', {
entity.features.reset();
entity.fields.reset();
entity.identities.reset();
if (!entity.waitUntilFeaturesDiscovered.isPending) {
entity.waitUntilFeaturesDiscovered = utils.getResolveablePromise()
}
entity.queryInfo();
return entity.waitUntilFeaturesDiscovered;
},
......
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