fix weird ternary

This commit is contained in:
psitacus 2025-07-27 14:38:07 -06:00
parent aea2ef99c0
commit 998e91004e

View file

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