From 3cfd2755c2dbaa6be98a806cf00590a6a84ce8cb Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 1 Jun 2024 09:44:19 +1000 Subject: [PATCH] fix(ui): when changing viewer state, always clear compare image --- .../frontend/web/src/features/gallery/store/gallerySlice.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts b/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts index 7861515eb5..fe17f45940 100644 --- a/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts +++ b/invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts @@ -89,10 +89,7 @@ export const gallerySlice = createSlice({ state.alwaysShowImageSizeBadge = action.payload; }, isImageViewerOpenChanged: (state, action: PayloadAction) => { - if (state.isImageViewerOpen && state.imageToCompare) { - state.imageToCompare = null; - return; - } + state.imageToCompare = null; state.isImageViewerOpen = action.payload; }, comparedImagesSwapped: (state) => {