From dba553facd61c68b5cf4f4b98a5664c289a16035 Mon Sep 17 00:00:00 2001 From: NilsUeter Date: Mon, 8 May 2023 22:11:11 +0200 Subject: [PATCH] fixed exception regarding abilities --- src/Roster.jsx | 1 + src/roster40k.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Roster.jsx b/src/Roster.jsx index baccfb7..c29a129 100644 --- a/src/Roster.jsx +++ b/src/Roster.jsx @@ -781,6 +781,7 @@ const ForceRules = ({ rules, onePerPage }) => { padding: "var(--size-20)", backgroundColor: "#dfe0e2", border: "2px solid var(--primary-color)", + marginBottom: 32, }} > {[...rules.keys()] diff --git a/src/roster40k.js b/src/roster40k.js index cd65691..1b9d469 100644 --- a/src/roster40k.js +++ b/src/roster40k.js @@ -958,7 +958,7 @@ function ParseModelProfiles(profiles, model, unit) { model.psyker = ParsePsykerProfile(profile); } else { // Everything else, like Prayers and Warlord Traits. - if (!unit.abilities[typeName]) unit.abilities[typeName] = new Map(); + if (!unit.abilities.Abilities) unit.abilities["Abilities"] = new Map(); ParseProfileCharacteristics( profile, profileName, @@ -980,6 +980,10 @@ function ParseProfileCharacteristics(profile, profileName, typeName, map) { map.set([profileName, charName.toString()].join(" - "), char.textContent); } else { // Profiles with a single characteristic can ignore the char name. + if (!map) { + debugger; + } + console.log(map); map.set(profileName, char.textContent); } }