Skip to content

Commit

Permalink
chore: refactor test utility for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Sep 1, 2023
1 parent e735e04 commit 2874d72
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1448,12 +1448,16 @@ function createDeploymentPlugin({
};

const triggerAction = (event, context) => {
switch (true) {
case (event === 'save'):

if (event === 'save') {
return activeTab;
case (props.actionTriggered &&
props.actionTriggered.emitEvent == event &&
props.actionTriggered.type == (context ? context.type : undefined)):
}

if (
props.actionTriggered &&
props.actionTriggered.emitEvent === event &&
props.actionTriggered.type === (context ? context.type : undefined)
) {
props.actionTriggered.handler(context);
}
};
Expand Down

0 comments on commit 2874d72

Please sign in to comment.