Set default data for a roll instead and fix title (#1570)

* Set default data for a roll instead and fix title

* Ensure same options object is used
This commit is contained in:
Carlos Fernandez 2026-01-22 17:21:18 -05:00 committed by GitHub
parent 23fd3a3f89
commit 69422ca3d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 4 deletions

View file

@ -292,9 +292,6 @@ export default class DamageRoll extends DHRoll {
if (isDie) diceIndex++;
return fixedTerm;
}),
options: {
roll: []
},
class: 'DamageRoll',
evaluated: false
});

View file

@ -3,7 +3,7 @@ import D20RollDialog from '../applications/dialogs/d20RollDialog.mjs';
export default class DHRoll extends Roll {
baseTerms = [];
constructor(formula, data = {}, options = {}) {
super(formula, data, options);
super(formula, data, foundry.utils.mergeObject(options, { roll: [] }, { overwrite: false }));
options.bonusEffects = this.bonusEffectBuilder();
if (!this.data || !Object.keys(this.data).length) this.data = options.data;
}