diff --git a/src/components/token/TokenDragOverlay.js b/src/components/token/TokenDragOverlay.js index b50ccbb..68b9d29 100644 --- a/src/components/token/TokenDragOverlay.js +++ b/src/components/token/TokenDragOverlay.js @@ -29,6 +29,10 @@ function TokenDragOverlay({ const mapRect = map.getBoundingClientRect(); function detectRemoveHover() { + if (!tokenGroup) { + return; + } + const pointerPosition = tokenGroup.getStage().getPointerPosition(); const screenSpacePointerPosition = { x: pointerPosition.x + mapRect.left,