mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
[Bug] Prevent some corrupt eggs from crashing the game (#5787)
If an egg is somehow a species that doesn't have an associated egg tier (such as Pikachu), `Egg#getEggTier` now falls back to `EggTier.COMMON`
This commit is contained in:
parent
5ba294ffee
commit
fa6c51d1e2
@ -598,7 +598,7 @@ export class Egg {
|
||||
}
|
||||
|
||||
private getEggTier(): EggTier {
|
||||
return speciesEggTiers[this.species];
|
||||
return speciesEggTiers[this.species] ?? EggTier.COMMON;
|
||||
}
|
||||
|
||||
////
|
||||
|
Loading…
Reference in New Issue
Block a user