diff --git a/module/rdd-combat.js b/module/rdd-combat.js index 506148fa..49b948d0 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -503,7 +503,7 @@ export class RdDCombat { ui.notifications.error("Le joueur " + game.user.name + " n'est connecté à aucun personnage. Impossible de continuer."); return; } - if ((game.user.isGM && !defenderToken.actor.hasPlayerOwner) || (defenderToken.actor.hasPlayerOwner && (game.user.character._id == defenderToken.actor.data._id))) { + if ((game.user.isGM && !defenderToken.actor.hasPlayerOwner) || (defenderToken.actor.hasPlayerOwner && (game.user.character?._id == defenderToken.actor.data._id))) { const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId); if (rddCombat) { const defenderRoll = msg.defenderRoll;