Skip to content

Commit

Permalink
BUGFIX: Setting command as favourite didn’t update it’s state properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Mar 15, 2023
1 parent 3928c06 commit 61c0d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/commandbar/src/state/commandBarReducer.ts
Expand Up @@ -145,7 +145,7 @@ function runAction(action: ACTION, nextState: CommandBarState, event: CommandBar
case ACTION.ADD_FAVOURITE:
assert(event.type === TRANSITION.ADD_FAVOURITE);
if (!nextState.favouriteCommands.includes(event.commandId)) {
nextState.favouriteCommands.push(event.commandId);
nextState.favouriteCommands = [...nextState.favouriteCommands, event.commandId];
}
break;
case ACTION.REMOVE_FAVOURITE:
Expand Down

0 comments on commit 61c0d77

Please sign in to comment.