fix oversight with save migration (#4731)

This commit is contained in:
Moka 2024-10-26 23:16:37 +02:00 committed by GitHub
parent 4fb1f37baa
commit 22865c010a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,8 +118,8 @@ export default class PokemonData {
// Deprecated, but needed for session data migration // Deprecated, but needed for session data migration
this.natureOverride = source.natureOverride; this.natureOverride = source.natureOverride;
this.mysteryEncounterPokemonData = new CustomPokemonData(source.mysteryEncounterPokemonData); this.mysteryEncounterPokemonData = source.mysteryEncounterPokemonData ? new CustomPokemonData(source.mysteryEncounterPokemonData) : null;
this.fusionMysteryEncounterPokemonData = new CustomPokemonData(source.fusionMysteryEncounterPokemonData); this.fusionMysteryEncounterPokemonData = source.fusionMysteryEncounterPokemonData ? new CustomPokemonData(source.fusionMysteryEncounterPokemonData) : null;
if (!forHistory) { if (!forHistory) {
this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss); this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss);