allow /dr and [[/dr]] to be rolled without selection

This commit is contained in:
psitacus 2025-07-27 14:32:41 -06:00
parent c81c1941a4
commit aea2ef99c0
4 changed files with 22 additions and 13 deletions

View file

@ -91,10 +91,10 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
context.roll = this.roll;
context.rollType = this.roll?.constructor.name;
context.rallyDie = this.roll.rallyChoices;
context.experiences = Object.keys(this.config.data.experiences).map(id => ({
context.experiences = this.config.data?.experiences ? Object.keys(this.config.data.experiences).map(id => ({
id,
...this.config.data.experiences[id]
}));
})) : [];
context.selectedExperiences = this.config.experiences;
context.advantage = this.config.roll?.advantage;
context.disadvantage = this.config.roll?.disadvantage;