diff --git a/scripts/modules/Regeneration.js b/scripts/modules/Regeneration.js index 3ac02f7..96c76cd 100644 --- a/scripts/modules/Regeneration.js +++ b/scripts/modules/Regeneration.js @@ -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; }