Fix map tile add to map drag bug

This commit is contained in:
Mitchell McCaffrey 2021-06-09 08:35:53 +10:00
parent 387ecd6fd7
commit 1ec67c7a0f

View File

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