From 0c694d2166d5d2e4eb19cd80acf1be9254038194 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 25 Apr 2026 22:37:04 -0600 Subject: [PATCH] Sort the attributes and attribute groups by name for now --- module/apps/PlayerSheet.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/apps/PlayerSheet.mjs b/module/apps/PlayerSheet.mjs index 1d59527..4a1bbed 100644 --- a/module/apps/PlayerSheet.mjs +++ b/module/apps/PlayerSheet.mjs @@ -312,7 +312,8 @@ export class PlayerSheet extends ctx.tabActive = this.tabGroups.primary === `attributes`; 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) { if (attr.system.aboveTheFold) { continue }; @@ -328,7 +329,7 @@ export class PlayerSheet extends group.attrs.push(attr); }; - ctx.attrGroups = [...groups.values()]; + ctx.attrGroups = [...groups.values()].toSorted((a, b) => a.name.localeCompare(b.name)); }; async _prepareTabList(ctx) {