mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Check for this.source
This commit is contained in:
parent
024450ecfb
commit
c1c8af5f6c
@ -2543,7 +2543,9 @@ export class ImprisonTag extends MoveRestrictionBattlerTag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override onAdd(pokemon: Pokemon) {
|
override onAdd(pokemon: Pokemon) {
|
||||||
this.source = pokemon.scene.getPokemonById(this.sourceId!)!;
|
if (this.sourceId) {
|
||||||
|
this.source = pokemon.scene.getPokemonById(this.sourceId)!;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user