Skip to content

Commit

Permalink
Reset selectedImageIndecies and focusIndex state on clearImage
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielrindlaub committed Dec 13, 2023
1 parent b588f7b commit f94a597
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/features/review/reviewSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ export const reviewSlice = createSlice({
state.workingImages = state.workingImages.concat(newImages);
})
.addCase(clearImages, (state) => {
state.workingImages = [];
state.workingImages = initialState.workingImages;
state.selectedImageIndices = initialState.selectedImageIndices;
state.focusIndex = initialState.focusIndex;
})
.addCase(toggleOpenLoupe, (state, { payload }) => {
if (payload === false) {
Expand Down

0 comments on commit f94a597

Please sign in to comment.