mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Fix inability to load saves due to modifier type being nulled
This commit is contained in:
parent
d790b30a30
commit
60f7aaaa93
@ -2921,7 +2921,10 @@ export default class BattleScene extends SceneBase {
|
|||||||
instant?: boolean,
|
instant?: boolean,
|
||||||
cost?: number,
|
cost?: number,
|
||||||
): boolean {
|
): boolean {
|
||||||
if (!modifier) {
|
// We check against modifier.type to stop a bug related to loading in a pokemon that has a form change item, which prior to some patch
|
||||||
|
// that changed form change modifiers worked, had previously set the `type` field to null.
|
||||||
|
// TODO: This is not the right place to check for this; it should ideally go in a session migrator.
|
||||||
|
if (!modifier || !modifier.type) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let success = false;
|
let success = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user