From 71400045545caf45f36462ce894865fbe1642fad Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Wed, 28 Jan 2026 19:03:02 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Refactor=20regional=20form=20check?= =?UTF-8?q?=20logic=20for=20improved=20readability=20and=20formatting=20co?= =?UTF-8?q?nsistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pokedex.online/src/utilities/gamemaster-utils.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/code/websites/pokedex.online/src/utilities/gamemaster-utils.js b/code/websites/pokedex.online/src/utilities/gamemaster-utils.js index 6065057..5f2ea54 100644 --- a/code/websites/pokedex.online/src/utilities/gamemaster-utils.js +++ b/code/websites/pokedex.online/src/utilities/gamemaster-utils.js @@ -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); }