Skip to content

Commit 61c0d77

Browse files
committed
BUGFIX: Setting command as favourite didn’t update it’s state properly
1 parent 3928c06 commit 61c0d77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/commandbar/src/state/commandBarReducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function runAction(action: ACTION, nextState: CommandBarState, event: CommandBar
145145
case ACTION.ADD_FAVOURITE:
146146
assert(event.type === TRANSITION.ADD_FAVOURITE);
147147
if (!nextState.favouriteCommands.includes(event.commandId)) {
148-
nextState.favouriteCommands.push(event.commandId);
148+
nextState.favouriteCommands = [...nextState.favouriteCommands, event.commandId];
149149
}
150150
break;
151151
case ACTION.REMOVE_FAVOURITE:

0 commit comments

Comments
 (0)