From efb957cd4b8c33ad4cf975112f484ec445aeecf1 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 8 Apr 2024 08:33:22 -0400 Subject: [PATCH] Fix crash with generating fused species name --- src/data/pokemon-species.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 1deecb083..2ad34f0b0 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -78,7 +78,7 @@ export function getFusedSpeciesName(speciesAName: string, speciesBName: string): fragB = fragB.slice(1); else { const newCharMatch = new RegExp(`[^${lastCharA}]`).exec(fragB); - if (newCharMatch.index > 0) + if (newCharMatch?.index > 0) fragB = fragB.slice(newCharMatch.index); } }