Fix token bar undefined reference

This commit is contained in:
Mitchell McCaffrey 2021-06-27 15:33:25 +10:00
parent 6e164e7f83
commit 70cb5f8f89

View File

@ -61,7 +61,7 @@ function TokenBar({ onMapTokensStateCreate }) {
setDragId(null);
const mapStage = mapStageRef.current;
if (mapStage) {
if (mapStage && overlayNodeClientRect) {
const dragRect = overlayNodeClientRect;
const dragPosition = {
x: dragRect.left + dragRect.width / 2,