Added token group null check in tokenDragOverlay

This commit is contained in:
Mitchell McCaffrey 2020-10-30 11:50:19 +11:00
parent fcbc903d16
commit d7b866d98d

View File

@ -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,