From 95838e5559c9eed0ac0db7f96dbf53985f17f97a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:31:18 +1100 Subject: [PATCH] fix(ui): fix remove from board dnd validation This is fired when the dnd image is moved over the 'none' board. Weren't defaulting to 'none' for the image's board_id, resulting in it being possible to drag a 'none' image onto 'none'. --- invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts b/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts index b040caf83d..e094627ab9 100644 --- a/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts +++ b/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts @@ -71,7 +71,7 @@ export const isValidDrop = ( // Check if the image's board is the board we are dragging onto if (payloadType === 'IMAGE_DTO') { const { imageDTO } = active.data.current.payload; - const currentBoard = imageDTO.board_id; + const currentBoard = imageDTO.board_id ?? 'none'; return currentBoard !== 'none'; }