From 43274ca6b79c4d36845f67cb3fd2165107d9b000 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 1 Jun 2021 00:08:23 +0200 Subject: [PATCH] Fix regression sur tour suivant --- module/rdd-combat.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/rdd-combat.js b/module/rdd-combat.js index 7698a484..cacc3dd1 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -393,9 +393,11 @@ export class RdDCombat { /* -------------------------------------------- */ static combatNouveauTour(combat) { if (Misc.isElectedUser()) { - let turn = combat.turns.find(t => t.tokenId == combat.current.tokenId); - this.displayActorCombatStatus(combat, turn.actor); - // TODO Playaudio for player?? + let turn = combat.turns.find(t => t.token?.id == combat.current.tokenId); + if (turn?.actor) { + RdDCombat.displayActorCombatStatus(combat, turn.actor); + // TODO Playaudio for player?? + } } }