Utilisation de get plutôt que find par id

This commit is contained in:
Vincent Vandemeulebrouck 2023-12-08 02:38:57 +01:00
parent 8e41250f64
commit ab9a21f402
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ export class RdDCombat {
static _callJetDeVie(event) {
let actorId = event.currentTarget.attributes['data-actorId'].value;
let tokenId = event.currentTarget.attributes['data-tokenId'].value;
let token = canvas.tokens.placeables.find(t => t.id == tokenId)
let token = canvas.tokens.get(tokenId)
const actor = token?.actor ?? game.actors.get(actorId);
if (actor?.isOwner) {
actor.jetDeVie();