From 4318af549510d508c8005f9d2e0c2b6a3f2bece0 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sat, 30 Oct 2021 10:31:10 +0200 Subject: [PATCH] Ajouter compteurs success/echec pour les points de tache #215 --- module/actor-sheet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 925a256b..2c3e6eaf 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -347,10 +347,10 @@ export class RdDActorSheet extends ActorSheet { html.find('.arme-label a').click(async event => { let armeName = event.currentTarget.text; let compName = event.currentTarget.attributes['data-competence-name'].value; - let arme = this.actor.data.find(it => + let arme = this.actor.data.items.find(it => it.name == armeName && RdDItemArme.isArme(it) && - ((compName ?? it.data.competence) == it.data.competence) + ((compName || it.data.data.competence) == it.data.data.competence) ); if (!arme) { arme = { name: armeName, data: { competence: compName } };