✨ Refactor regional form check logic for improved readability and formatting consistency
This commit is contained in:
@@ -50,11 +50,14 @@ export function breakUpGamemaster(gamemaster) {
|
||||
// Add to pokemon (filtered - first occurrence OR regional forms)
|
||||
// Check if this is a regional form by looking at the form string
|
||||
const form = pokemonSettings?.form;
|
||||
const isRegionalForm = form ? regionCheck.includes(
|
||||
form.split('_')[1]?.toLowerCase()
|
||||
) : false;
|
||||
const isRegionalForm = form
|
||||
? regionCheck.includes(form.split('_')[1]?.toLowerCase())
|
||||
: false;
|
||||
|
||||
if (!acc.pokemonSeen.has(pokemonId) || (acc.pokemonSeen.has(pokemonId) && isRegionalForm)) {
|
||||
if (
|
||||
!acc.pokemonSeen.has(pokemonId) ||
|
||||
(acc.pokemonSeen.has(pokemonId) && isRegionalForm)
|
||||
) {
|
||||
acc.pokemonSeen.add(pokemonId);
|
||||
acc.pokemon.push(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user