[Fix] Levelup New Experience Increase (#1461)

* Fixed so you can select a newly gained experience to increase

* .

* Exchanged forEach with for..of. The future is now
This commit is contained in:
WBHarry 2025-12-24 01:00:24 +01:00 committed by GitHub
parent f184db1f93
commit 0806c2d1ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 12 deletions

View file

@ -98,10 +98,10 @@ export default class D20Roll extends DHRoll {
this.options.roll.modifiers = this.applyBaseBonus();
this.options.experiences?.forEach(m => {
if (this.options.data.experiences?.[m])
if (this.options.data.system?.experiences?.[m])
this.options.roll.modifiers.push({
label: this.options.data.experiences[m].name,
value: this.options.data.experiences[m].value
label: this.options.data.system.experiences[m].name,
value: this.options.data.system.experiences[m].value
});
});