Skip to content

Commit

Permalink
🚧 simplify focus state change
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Oct 17, 2024
1 parent 78baef7 commit d66ee7b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/reducers/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,7 @@ const Controls = (state: ControlsState = getDefaultControlsState(), action): Con
return Object.assign({}, state, updatesToState);
}
case types.TOGGLE_FOCUS: {
let newValue = !state.focus;
return Object.assign({}, state, {
focus: newValue
});
return {...state, focus: !state.focus}
}
case types.CHANGE_DATES_VISIBILITY_THICKNESS: {
const newDates: Partial<ControlsState> = { quickdraw: action.quickdraw };
Expand Down

0 comments on commit d66ee7b

Please sign in to comment.