This commit is contained in:
Dragon Fire
2021-01-18 18:09:03 -05:00
parent bba0d2d87c
commit f9fbcba28c
+1 -1
View File
@@ -109,7 +109,7 @@ module.exports = class Pokemon {
if (this.missingno && form === 'yellow') return missingno.sprites.yellow;
if (this.id === 898) return 'https://assets.pokemon.com/assets/cms2/img/pokedex/full/898.png';
const found = this.varieties.find(vrity => variety ? vrity.id === variety.toLowerCase() : vrity.default);
const name = found.name ? found.name.toLowerCase().split(' ').map(n => n.charAt(0)).join('') : '';
const name = found.default ? '' : found.name.toLowerCase().split(' ').map(n => n.charAt(0)).join('');
return `https://serebii.net/pokemon/art/${this.displayID}${name ? `-${name}` : ''}.png`;
}