always listen for new events when waiting for options, not just when they are requested.

This commit is contained in:
danfunk 2023-08-31 14:04:54 -04:00
parent d62f021e3a
commit 035098e981
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ export function SpiffExtensionSelect(props) {
function requestOptions(eventBus, element, commandStack, optionType) {
// Little backwards, but you want to assure you are ready to catch, before you throw
// or you risk a race condition.
eventBus.once(`spiff.${optionType}.returned`, (event) => {
eventBus.on(`spiff.${optionType}.returned`, (event) => {
spiffExtensionOptions[optionType] = event.options;
});
eventBus.fire(`spiff.${optionType}.requested`, { eventBus });