Skip to content

Commit

Permalink
Merge pull request #308 from wraythex/wraythex-patch-2
Browse files Browse the repository at this point in the history
Create fallbacks for missing data (master)
  • Loading branch information
wraythex authored Sep 4, 2023
2 parents a4347fd + dba0879 commit f44c4b3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions static/js/utils/utils.pokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,18 @@ function getPokemonGen(id) {
}

function getMoveName(id) {
return i18n(moveData[id].name)
const n = moveData[id].name
return i18n(n ? n : 'move_' + id)
}

function getMoveType(id) {
return i18n(moveData[id].type)
const n = moveData[id].type
return i18n(n ? n : 'move_type_' + id)
}

function getMoveTypeNoI8ln(id) {
return moveData[id].type
const n = moveData[id].type
return n ? n : 'move_type_' + id
}

function getPokemonRarity(pokemonId) {
Expand Down

0 comments on commit f44c4b3

Please sign in to comment.