Issue 64: Fixing issue where the new rank did not show until after adding a new item....

This commit is contained in:
Litasa
2026-02-25 21:55:00 +00:00
parent 0c299db26f
commit 0854e25a66

View File

@@ -155,6 +155,12 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
adv[rank].spent.total += xp_used_total;
adv[rank].spent.curriculum += xp_used;
});
// If we finished the rank but haven't added anything to the next rank we should show an empty tab
// note: adv is index from 1, not 0 because of rank starting at 1
if(adv.length -1 < sheetData.data.system.identity.school_rank) {
adv.push({list: [], rank: sheetData.data.system.identity.school_rank, spent: { total: 0, curriculum: 0}});
}
sheetData.data.advancementsListByRank = adv;
}