Sort the attributes and attribute groups by name for now

This commit is contained in:
Oliver 2026-04-25 22:37:04 -06:00
parent dbaac0cf29
commit 0c694d2166

View file

@ -312,7 +312,8 @@ export class PlayerSheet extends
ctx.tabActive = this.tabGroups.primary === `attributes`; ctx.tabActive = this.tabGroups.primary === `attributes`;
const groups = new Map(); const groups = new Map();
const attrs = this.actor.itemTypes.attribute ?? []; const attrs = (this.actor.itemTypes.attribute ?? [])
.toSorted((a, b) => a.name.localeCompare(b.name));
for (const attr of attrs) { for (const attr of attrs) {
if (attr.system.aboveTheFold) { continue }; if (attr.system.aboveTheFold) { continue };
@ -328,7 +329,7 @@ export class PlayerSheet extends
group.attrs.push(attr); group.attrs.push(attr);
}; };
ctx.attrGroups = [...groups.values()]; ctx.attrGroups = [...groups.values()].toSorted((a, b) => a.name.localeCompare(b.name));
}; };
async _prepareTabList(ctx) { async _prepareTabList(ctx) {