Prevent crash from null dexData attributes

This commit is contained in:
Moka 2024-11-14 22:37:29 +01:00
parent 640ac23741
commit 9601288619

View File

@ -679,7 +679,7 @@ export class GameData {
return ret;
}
return k.endsWith("Attr") && ![ "natureAttr", "abilityAttr", "passiveAttr" ].includes(k) ? BigInt(v) : v;
return k.endsWith("Attr") && ![ "natureAttr", "abilityAttr", "passiveAttr" ].includes(k) ? BigInt(v ?? 0) : v;
}) as SystemSaveData;
}