From 6c4cd2724eefefd31b1c1e3c4b409917188c7919 Mon Sep 17 00:00:00 2001 From: Jeff Colombo Date: Sun, 10 Feb 2019 18:40:28 -0500 Subject: [PATCH] fix default name capitalization --- src/scripts/parseGameMaster.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scripts/parseGameMaster.ts b/src/scripts/parseGameMaster.ts index bd70469..02beee5 100644 --- a/src/scripts/parseGameMaster.ts +++ b/src/scripts/parseGameMaster.ts @@ -38,7 +38,11 @@ export const parseGameMaster = async () => { const pokemonData = pokemonDataByPokemonId.get(pokemonId) || []; const dex = parseInt(RegExp.$1, 10); - const speciesInfo = await apiService.getPokemonSpeciesInfo(pokemonId, dex, POGOProtos.Enums.PokemonId[pokemonId]); + const defaultName = POGOProtos.Enums.PokemonId[pokemonId].toLowerCase() + .split(' ') + .map((s) => s.charAt(0).toUpperCase() + s.substring(1)) + .join(' '); + const speciesInfo = await apiService.getPokemonSpeciesInfo(pokemonId, dex, defaultName); const mon = { ...speciesInfo,