fixed exception regarding abilities

This commit is contained in:
NilsUeter
2023-05-08 22:11:11 +02:00
parent 6bd9674eee
commit dba553facd
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -781,6 +781,7 @@ const ForceRules = ({ rules, onePerPage }) => {
padding: "var(--size-20)",
backgroundColor: "#dfe0e2",
border: "2px solid var(--primary-color)",
marginBottom: 32,
}}
>
{[...rules.keys()]
+5 -1
View File
@@ -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);
}
}