From 12295d7680bde0479a872a5153e825cd5c7c04d3 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 8 Jan 2024 00:35:41 -0500 Subject: [PATCH] Fix crash with normal type gym leaders --- src/data/trainer-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/trainer-type.ts b/src/data/trainer-type.ts index 4d62b74e2..d746a89d9 100644 --- a/src/data/trainer-type.ts +++ b/src/data/trainer-type.ts @@ -530,7 +530,7 @@ export class TrainerConfig { this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(speciesPool)); }); if (specialtyTypes.length) { - this.setSpeciesFilter(p => !!specialtyTypes.find(t => p.isOfType(t))); + this.setSpeciesFilter(p => specialtyTypes.find(t => p.isOfType(t)) !== undefined); this.setSpecialtyTypes(...specialtyTypes); } this.setMoneyMultiplier(2.5);