Prevent crash from null dexData attributes (#4871)

This commit is contained in:
Moka 2024-11-15 00:01:04 +01:00 committed by GitHub
parent 58912db8f1
commit f778bd5877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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;
}