From f776dc83178d1606b80f068e1e49fb9e53f62365 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Sun, 26 Apr 2026 23:52:55 -0400 Subject: Update charsheet --- assets/charsheet/charsheet.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'assets/charsheet') diff --git a/assets/charsheet/charsheet.js b/assets/charsheet/charsheet.js index 108cd14..c43a2b2 100644 --- a/assets/charsheet/charsheet.js +++ b/assets/charsheet/charsheet.js @@ -274,7 +274,10 @@ async function fetchUser(uid) { for (let nm in info.properties) { setField(nm, info.properties[nm]); } - setField("unallocated", info.stats["talentpoints"] - info.stats["allocatedtalentpoints"]); + setField( + "unallocated", + (info.stats["talentpoints"] || 0) - (info.stats["allocatedtalentpoints"] || 0) + ); const badges = document.getElementById("badges"); if (badges) { const badges_resp = await fetch(`${globalThis.apiServer}/user/badges/${uid}`); -- cgit v1.2.3