From d7b866d98dbc1520859da4075ebcd7de9eaf18e7 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Fri, 30 Oct 2020 11:50:19 +1100 Subject: [PATCH] Added token group null check in tokenDragOverlay --- src/components/token/TokenDragOverlay.js | 4 ++++ 1 file changed, 4 insertions(+) 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,