Unverified Commit 2cf58be2 authored by James Howard's avatar James Howard Committed by GitHub

Add missing await for API request (#27676)

`getAllPostsWithSlug` was missing an `await` on `fetchAPI`, resulting
in `data?.allPosts` always returning `undefined`. This meant SSG wasn't
aware of the paths it needed to generate.
parent 807d1ec7
...@@ -58,7 +58,7 @@ export async function getPreviewPostBySlug(slug) { ...@@ -58,7 +58,7 @@ export async function getPreviewPostBySlug(slug) {
} }
export async function getAllPostsWithSlug() { export async function getAllPostsWithSlug() {
const data = fetchAPI(` const data = await fetchAPI(`
{ {
allPosts { allPosts {
slug slug
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment