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'.
This commit is contained in:
psychedelicious 2023-10-04 21:31:18 +11:00
parent 3e8d62b1d1
commit 95838e5559

View File

@ -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';
}