Safety check for experiences (#1515)

Co-authored-by: Chris Ryan <chrisr@blackhole>
This commit is contained in:
Chris Ryan 2026-01-10 00:55:16 +10:00 committed by GitHub
parent c6bdc846ab
commit 248f7b41e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,7 +104,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
context.roll = this.roll;
context.rollType = this.roll?.constructor.name;
context.rallyDie = this.roll.rallyChoices;
const experiences = this.config.data?.system.experiences || {};
const experiences = this.config.data?.system?.experiences || {};
context.experiences = Object.keys(experiences).map(id => ({
id,
...experiences[id]