Skip to content

Commit

Permalink
Merge pull request #307 from wraythex/wraythex-patch-1
Browse files Browse the repository at this point in the history
Create fallbacks for missing data (async)
  • Loading branch information
wraythex authored Sep 4, 2023
2 parents 84a3388 + 1eb063c commit 2ee3f75
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 @@ -152,15 +152,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 2ee3f75

Please sign in to comment.