Update collections.md (#485)

Very minor typo in the example code pulling results out of the `pokeapi` response
This commit is contained in:
Tony @ Navillus 2021-06-17 18:47:48 +00:00 committed by GitHub
parent b13ac15365
commit fc4433e640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,7 +115,7 @@ export let collection: any;
export async function createCollection() {
const allPokemonResponse = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=150`);
const allPokemonResult = await allPokemonResponse.json();
const allPokemon = allPokemonResult.result;
const allPokemon = allPokemonResult.results;
const allLetters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];
return {
// `routes` defines the total collection of routes as `params` data objects.