Skip to content

Commit

Permalink
Ensure listItem is exposed for set/unset custom variables handler (To…
Browse files Browse the repository at this point in the history
  • Loading branch information
sherfin94 authored Apr 13, 2022
1 parent fb34655 commit fda71f0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/_helpers/appUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,26 +290,26 @@ function executeAction(_ref, event, mode, customVariables) {
case 'set-custom-variable': {
const key = resolveReferences(event.key, _ref.state.currentState, undefined, customVariables);
const value = resolveReferences(event.value, _ref.state.currentState, undefined, customVariables);
const customVariables = { ..._ref.state.currentState.variables };
customVariables[key] = value;
const customAppVariables = { ..._ref.state.currentState.variables };
customAppVariables[key] = value;

return _ref.setState({
currentState: {
..._ref.state.currentState,
variables: customVariables,
variables: customAppVariables,
},
});
}

case 'unset-custom-variable': {
const key = resolveReferences(event.key, _ref.state.currentState, undefined, customVariables);
const customVariables = { ..._ref.state.currentState.variables };
delete customVariables[key];
const customAppVariables = { ..._ref.state.currentState.variables };
delete customAppVariables[key];

return _ref.setState({
currentState: {
..._ref.state.currentState,
variables: customVariables,
variables: customAppVariables,
},
});
}
Expand Down

0 comments on commit fda71f0

Please sign in to comment.