There might not actually be a dragged token when trying to end the measurement

This commit is contained in:
Manuel Vögele
2021-04-28 23:25:22 +02:00
parent d04ea9b0b7
commit f0d1ef9d48
+1 -1
View File
@@ -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();
}