Ensure same options object is used

This commit is contained in:
Carlos Fernandez 2026-01-22 17:14:23 -05:00
parent 76bfc56ce0
commit f067a1d516

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, foundry.utils.mergeObject({ roll: [] }, 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;
}