From 3fcb7af1c88eef0a43c62a7d2651358601af0995 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Tue, 13 Jan 2026 01:05:37 +0100 Subject: [PATCH] Update module/dice/dhRoll.mjs Co-authored-by: Carlos Fernandez --- module/dice/dhRoll.mjs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 1485085e..a5ac5091 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -194,17 +194,15 @@ export default class DHRoll extends Roll { getBonus(path, label) { const modifiers = []; for (const effect of Object.values(this.options.bonusEffects)) { - if (effect.selected) { - for (const change of effect.changes) { - if (change.key.includes(path)) { - const changeValue = game.system.api.documents.DhActiveEffect.getChangeValue( - this.data, - change, - effect.origEffect - ); - modifiers.push({ label: label, value: changeValue }); - } - } + if (!effect.selected) continue; + for (const change of effect.changes) { + if (!change.key.includes(path)) continue; + const changeValue = game.system.api.documents.DhActiveEffect.getChangeValue( + this.data, + change, + effect.origEffect + ); + modifiers.push({ label: label, value: changeValue }); } }