mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fix :: check for if control component event with no component selected (#6282)
This commit is contained in:
parent
bf48e0b565
commit
9988b676c3
1 changed files with 2 additions and 2 deletions
|
|
@ -551,12 +551,12 @@ function executeActionWithDebounce(_ref, event, mode, customVariables) {
|
|||
const component = Object.values(_ref.state.currentState?.components ?? {}).filter(
|
||||
(component) => component.id === event.componentId
|
||||
)[0];
|
||||
const action = component[event.componentSpecificActionHandle];
|
||||
const action = component?.[event.componentSpecificActionHandle];
|
||||
const actionArguments = _.map(event.componentSpecificActionParams, (param) => ({
|
||||
...param,
|
||||
value: resolveReferences(param.value, _ref.state.currentState, undefined, customVariables),
|
||||
}));
|
||||
const actionPromise = action(...actionArguments.map((argument) => argument.value));
|
||||
const actionPromise = actionArguments?.length && action(...actionArguments.map((argument) => argument.value));
|
||||
return actionPromise ?? Promise.resolve();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue