From 22865c010a5edcd084863d2c777e272bd456c458 Mon Sep 17 00:00:00 2001 From: Moka <54149968+MokaStitcher@users.noreply.github.com> Date: Sat, 26 Oct 2024 23:16:37 +0200 Subject: [PATCH] fix oversight with save migration (#4731) --- src/system/pokemon-data.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index c8756e4dd7f..485c1d90c1d 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -118,8 +118,8 @@ export default class PokemonData { // Deprecated, but needed for session data migration this.natureOverride = source.natureOverride; - this.mysteryEncounterPokemonData = new CustomPokemonData(source.mysteryEncounterPokemonData); - this.fusionMysteryEncounterPokemonData = new CustomPokemonData(source.fusionMysteryEncounterPokemonData); + this.mysteryEncounterPokemonData = source.mysteryEncounterPokemonData ? new CustomPokemonData(source.mysteryEncounterPokemonData) : null; + this.fusionMysteryEncounterPokemonData = source.fusionMysteryEncounterPokemonData ? new CustomPokemonData(source.fusionMysteryEncounterPokemonData) : null; if (!forHistory) { this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss);