diff options
| author | LLLL Colonq <llll@colonq> | 2026-04-26 23:52:55 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-04-26 23:52:55 -0400 |
| commit | f776dc83178d1606b80f068e1e49fb9e53f62365 (patch) | |
| tree | 279e579e0eb59c8b8b17fd81ed491559296de943 /assets/charsheet | |
| parent | f75769acfd4b14c3fcd0bca807f80e62aeeb0883 (diff) | |
Diffstat (limited to 'assets/charsheet')
| -rw-r--r-- | assets/charsheet/charsheet.js | 5 |
1 files changed, 4 insertions, 1 deletions
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}`); |
