Fix crash with generating fused species name

pull/61/head
Flashfyre 2024-04-08 08:33:22 -04:00
parent f16f4576fe
commit efb957cd4b
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ export function getFusedSpeciesName(speciesAName: string, speciesBName: string):
fragB = fragB.slice(1); fragB = fragB.slice(1);
else { else {
const newCharMatch = new RegExp(`[^${lastCharA}]`).exec(fragB); const newCharMatch = new RegExp(`[^${lastCharA}]`).exec(fragB);
if (newCharMatch.index > 0) if (newCharMatch?.index > 0)
fragB = fragB.slice(newCharMatch.index); fragB = fragB.slice(newCharMatch.index);
} }
} }