try to fix error when abilitiesMap undefined

This commit is contained in:
NilsUeter
2025-03-20 17:47:19 +01:00
parent 1d45b814e6
commit b49b3e83d0
+1 -1
View File
@@ -562,7 +562,7 @@ const Unit = ({
};
const checkAbilitiesForInvul = (abilitiesMap, name) => {
const abilities = [...abilitiesMap.keys()];
const abilities = [...(abilitiesMap?.keys?.() || [])];
for (let ability of abilities) {
if (ability.includes(":")) {
// if : then only match if the name is the same