mirror of
https://github.com/withastro/astro.git
synced 2025-02-10 22:38:53 -05:00
Update collections.md (#485)
Very minor typo in the example code pulling results out of the `pokeapi` response
This commit is contained in:
parent
b13ac15365
commit
fc4433e640
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ export let collection: any;
|
||||||
export async function createCollection() {
|
export async function createCollection() {
|
||||||
const allPokemonResponse = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=150`);
|
const allPokemonResponse = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=150`);
|
||||||
const allPokemonResult = await allPokemonResponse.json();
|
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'];
|
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 {
|
return {
|
||||||
// `routes` defines the total collection of routes as `params` data objects.
|
// `routes` defines the total collection of routes as `params` data objects.
|
||||||
|
|
Loading…
Add table
Reference in a new issue