Fix map tile add to map drag bug
This commit is contained in:
parent
387ecd6fd7
commit
1ec67c7a0f
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user