restore await on on promise contracts

This commit is contained in:
pgayvallet 2021-01-29 18:08:23 +01:00
parent c13d07daf3
commit c5f2fe516b

View file

@ -111,7 +111,8 @@ export class PluginsSystem {
errorMessage: `Setup lifecycle of "${pluginName}" plugin wasn't completed in 30sec. Consider disabling the plugin and re-start.`,
});
} else {
contract = contractOrPromise;
// awaiting non-promise contract to get back in the event queue
contract = await contractOrPromise;
}
contracts.set(pluginName, contract);
@ -160,7 +161,8 @@ export class PluginsSystem {
errorMessage: `Start lifecycle of "${pluginName}" plugin wasn't completed in 30sec. Consider disabling the plugin and re-start.`,
});
} else {
contract = contractOrPromise;
// awaiting non-promise contract to get back in the event queue
contract = await contractOrPromise;
}
contracts.set(pluginName, contract);