diff --git a/src/components/token/TokenDragOverlay.js b/src/components/token/TokenDragOverlay.js index e1aafd1..b50ccbb 100644 --- a/src/components/token/TokenDragOverlay.js +++ b/src/components/token/TokenDragOverlay.js @@ -34,6 +34,9 @@ function TokenDragOverlay({ x: pointerPosition.x + mapRect.left, y: pointerPosition.y + mapRect.top, }; + if (!removeTokenRef.current) { + return; + } const removeIconPosition = removeTokenRef.current.getBoundingClientRect(); if (