try to fix error when abilitiesMap undefined
This commit is contained in:
+1
-1
@@ -562,7 +562,7 @@ const Unit = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const checkAbilitiesForInvul = (abilitiesMap, name) => {
|
const checkAbilitiesForInvul = (abilitiesMap, name) => {
|
||||||
const abilities = [...abilitiesMap.keys()];
|
const abilities = [...(abilitiesMap?.keys?.() || [])];
|
||||||
for (let ability of abilities) {
|
for (let ability of abilities) {
|
||||||
if (ability.includes(":")) {
|
if (ability.includes(":")) {
|
||||||
// if : then only match if the name is the same
|
// if : then only match if the name is the same
|
||||||
|
|||||||
Reference in New Issue
Block a user