From f0d1ef9d48c4f7a143cc0d318bd04a575a49b77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Wed, 28 Apr 2021 23:25:22 +0200 Subject: [PATCH] There might not actually be a dragged token when trying to end the measurement --- src/foundry_imports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundry_imports.js b/src/foundry_imports.js index f60dd89..b39bcb0 100644 --- a/src/foundry_imports.js +++ b/src/foundry_imports.js @@ -36,7 +36,7 @@ export async function moveTokens(draggedToken, selectedTokens) { await animateTokens.call(this, selectedTokens, draggedToken, rays, wasPaused); // Once all animations are complete we can clear the ruler - if (this.draggedToken.id === draggedToken.id) + if (this.draggedToken?.id === draggedToken.id) this._endMeasurement(); }