Skip to content

Commit cfc3a20

Browse files
Mary Hipppsychedelicious
authored andcommitted
autoAddBoardId should always be defined
1 parent 05ae4e2 commit cfc3a20

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageUploaded.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const addImageUploadedFulfilledListener = () => {
4040
// default action - just upload and alert user
4141
if (postUploadAction?.type === 'TOAST') {
4242
const { toastOptions } = postUploadAction;
43-
if (!autoAddBoardId) {
43+
if (!autoAddBoardId || autoAddBoardId === 'none') {
4444
dispatch(addToast({ ...DEFAULT_UPLOADED_TOAST, ...toastOptions }));
4545
} else {
4646
// Add this image to the board

invokeai/frontend/web/src/features/gallery/store/gallerySlice.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export const gallerySlice = createSlice({
4141
state.galleryView = 'images';
4242
},
4343
autoAddBoardIdChanged: (state, action: PayloadAction<BoardId>) => {
44+
if (!action.payload) {
45+
state.autoAddBoardId = 'none';
46+
return;
47+
}
4448
state.autoAddBoardId = action.payload;
4549
},
4650
galleryViewChanged: (state, action: PayloadAction<GalleryView>) => {

0 commit comments

Comments
 (0)