Skip to content

Commit

Permalink
fix: reset colors when applying scenario without colors
Browse files Browse the repository at this point in the history
ref #3250
  • Loading branch information
shaman-apprentice committed Apr 24, 2023
1 parent b84fcec commit d5423b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const defaultMapColors: MapColors = {

export const mapColors = createReducer(
defaultMapColors,
on(setMapColors, (state, action) => ({ ...state, ...action.value })),
on(setMapColors, (state, action) => ({ ...state, ...(action.value ?? defaultMapColors) })),
on(invertColorRange, state => ({ ...state, positive: state.negative, negative: state.positive })),
on(invertDeltaColors, state => ({ ...state, positiveDelta: state.negativeDelta, negativeDelta: state.positiveDelta }))
)

0 comments on commit d5423b9

Please sign in to comment.