Skip to content

Commit

Permalink
Copy pokemon.otherFormes
Browse files Browse the repository at this point in the history
Not sure why this needs a copy since pokemonForms would already be a copy? Whatever
  • Loading branch information
Glazelf committed Dec 20, 2023
1 parent ed7b0cc commit 9b9277f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/pokemon/getPokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ module.exports = async ({ client, interaction, pokemon, learnsetBool = false, sh
4: new Discord.MessageActionRow()
};
let pokemonForms = [];
if (pokemon.otherFormes && pokemon.otherFormes.length > 0) pokemonForms = pokemon.otherFormes;
if (pokemon.otherFormes && pokemon.otherFormes.length > 0) pokemonForms = [...pokemon.otherFormes]; // Needs to be a copy. Not sure why since no changes are being applied to pokemon.otherFormes. Whatever.
if (pokemon.canGigantamax) pokemonForms.push(`${pokemon.name}-Gmax`);
if (pokemonForms && pokemonForms.length > 0) {
if (pokemonForms.length > 0) {
Expand Down

0 comments on commit 9b9277f

Please sign in to comment.