From 1ec67c7a0ff3ef4033160811088895ec60b2078e Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Wed, 9 Jun 2021 08:35:53 +1000 Subject: [PATCH] Fix map tile add to map drag bug --- src/modals/SelectMapModal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modals/SelectMapModal.js b/src/modals/SelectMapModal.js index c67e14d..8a2cdbc 100644 --- a/src/modals/SelectMapModal.js +++ b/src/modals/SelectMapModal.js @@ -170,11 +170,11 @@ function SelectMapModal({ const [canAddDraggedMap, setCanAddDraggedMap] = useState(false); function handleGroupsSelect(groupIds) { - if (!canAddDraggedMap && groupIds.length === 1) { + if (groupIds.length === 1) { // Only allow adding a map from dragging if there is a single group item selected const group = findGroup(mapGroups, groupIds[0]); setCanAddDraggedMap(group && group.type === "item"); - } else if (canAddDraggedMap) { + } else { setCanAddDraggedMap(false); } }