Skip to content

Commit

Permalink
Merge pull request #15 from thatlonelybugbear/patch-1
Browse files Browse the repository at this point in the history
Clearing ActiveEffect5e#label deprecation warnings
  • Loading branch information
vtt-lair authored Dec 7, 2023
2 parents 7163e0a + 8df4bf9 commit e637af0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/modules/Regeneration.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ export class Regeneration {

/** before we check anything else, is regen blocked on this actor? */
const regenBlockName = HELPER.setting(MODULE.data.name, "regenBlock");
const blockEffect = actor.effects?.find(e => e.label === regenBlockName );
const blockEffect = actor.effects?.find(e => e.name ?? e.label === regenBlockName );
const enabledBlockEffect = !(getProperty(blockEffect ?? {}, 'disabled') ?? true);

if (enabledBlockEffect) {
logger.debug(game.settings.get(MODULE.data.name, "debug"), `${NAME} | ${actor.name}'s regeneration blocked by ${blockEffect.label}`);
logger.debug(game.settings.get(MODULE.data.name, "debug"), `${NAME} | ${actor.name}'s regeneration blocked by ${blockEffect.name ?? blockEffect.label}`);
return null;
}

Expand Down

0 comments on commit e637af0

Please sign in to comment.