fix(ui): discard selected staging image not all other images

This commit is contained in:
psychedelicious 2024-08-17 16:17:12 +10:00
parent db885aa180
commit 8601fbb4ea

View File

@ -26,7 +26,7 @@ export const sessionReducers = {
},
sessionStagedImageDiscarded: (state, action: PayloadAction<{ index: number }>) => {
const { index } = action.payload;
state.session.stagedImages = state.session.stagedImages.splice(index, 1);
state.session.stagedImages.splice(index, 1);
state.session.selectedStagedImageIndex = Math.min(
state.session.selectedStagedImageIndex,
state.session.stagedImages.length - 1