Skip to content

Commit

Permalink
code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbharti committed Mar 27, 2024
1 parent 2628f5d commit a8c02dc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ const buildData = (data) => {
switch (team.slot) {
case 0: {
let pokemonName =
team.form.name !== "FORM_UNSET"
team.form.name !== "FORM_UNSET" &&
!team.form.name.includes(team.pokemon.name)
? team.form.name
.replace(/_ALOLAN?/, "-alolan")
.replace(/_GALARI?A?N?/, "-galarian")
Expand All @@ -142,7 +143,8 @@ const buildData = (data) => {
}
case 1: {
let pokemonName =
team.form.name !== "FORM_UNSET"
team.form.name !== "FORM_UNSET" &&
!team.form.name.includes(team.pokemon.name)
? team.form.name
.replace(/_ALOLAN?/, "-alolan")
.replace(/_GALARI?A?N?/, "-galarian")
Expand All @@ -162,7 +164,8 @@ const buildData = (data) => {
}
case 2: {
let pokemonName =
team.form.name !== "FORM_UNSET"
team.form.name !== "FORM_UNSET" &&
!team.form.name.includes(team.pokemon.name)
? team.form.name
.replace(/_ALOLAN?/, "-alolan")
.replace(/_GALARI?A?N?/, "-galarian")
Expand Down

0 comments on commit a8c02dc

Please sign in to comment.