undefined cannot be transmitted via json, so we use null to reset the movement history instead

This commit is contained in:
Manuel Vögele
2021-05-03 10:52:57 +02:00
parent 43f26088b5
commit 891bb1b4d8
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -1,3 +1,8 @@
## In development
### Bugfixes
- The reset movement history button now resets the movement history for all players, not just for the GM
## 1.6.1
### API
- Added `onMovementHistoryUpdate` callback to Speed Providers, that allows them to perform game systems specific improvements to the movement history
+3 -3
View File
@@ -86,8 +86,8 @@ export async function resetMovementHistory(combat, combatantId) {
const dragRulerFlags = combatant.flags.dragRuler;
if (!dragRulerFlags)
return;
dragRulerFlags.passedWaypoints = undefined;
dragRulerFlags.trackedRound = undefined;
dragRulerFlags.rulerState = undefined;
dragRulerFlags.passedWaypoints = null;
dragRulerFlags.trackedRound = null;
dragRulerFlags.rulerState = null;
await updateCombatantDragRulerFlags(combat, [{_id: combatantId, dragRulerFlags}]);
}