Skip to content

Commit

Permalink
Clearing ActiveEffect5e#label deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thatlonelybugbear authored Nov 22, 2023
1 parent 7163e0a commit 8df4bf9
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 8df4bf9

Please sign in to comment.