Enhance regional form check by verifying form type as a string

This commit is contained in:
2026-01-28 19:03:13 +00:00
parent 7140004554
commit 6f060001d5

View File

@@ -50,7 +50,7 @@ export function breakUpGamemaster(gamemaster) {
// Add to pokemon (filtered - first occurrence OR regional forms) // Add to pokemon (filtered - first occurrence OR regional forms)
// Check if this is a regional form by looking at the form string // Check if this is a regional form by looking at the form string
const form = pokemonSettings?.form; const form = pokemonSettings?.form;
const isRegionalForm = form const isRegionalForm = form && typeof form === 'string'
? regionCheck.includes(form.split('_')[1]?.toLowerCase()) ? regionCheck.includes(form.split('_')[1]?.toLowerCase())
: false; : false;