mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
[Bug] Prevent some corrupt eggs from crashing the game
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
3ba1ed3fb4
commit
99e480f7c0
@ -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