Bugfix in handler

This commit is contained in:
2020-09-07 17:35:05 +10:00
parent 553ae44dc1
commit 1addf15a39

View File

@@ -84,6 +84,11 @@ const handler = {
//return all pokemon fields after filtering //return all pokemon fields after filtering
const fields = scalars.map(s => s.name); const fields = scalars.map(s => s.name);
return filteredPokemon.map(p => { return filteredPokemon.map(p => {
//BUGFIX
if (!p.base_stats) {
return null;
}
const ret = {}; const ret = {};
if (fields.includes('hp')) { if (fields.includes('hp')) {