This commit is contained in:
Dragon Fire
2021-01-22 18:17:48 -05:00
parent 793ca59e18
commit 2364770b8f
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ module.exports = class MoveStore extends Collection {
}
async fetch(query) {
query = this.makeSlug(query);
if (this.has(query)) return this.get(query);
query = this.makeSlug(query.toString());
if (!query) return null;
const found = this.find(pokemon => pokemon.slug === query);
if (found) return found;