From 73ebd03c576f3c93ea9aa33adbf3418443120c8f Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 11 Sep 2021 16:23:07 -0500 Subject: [PATCH] Try passing props on falsy pageListing --- pages/formula/[...slug].js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/formula/[...slug].js b/pages/formula/[...slug].js index fe18f3c..15dd11e 100644 --- a/pages/formula/[...slug].js +++ b/pages/formula/[...slug].js @@ -41,7 +41,7 @@ export async function getStaticProps({ params }) { // return JSON.parse(endpointsJson) // }) - const allEndpointListings = await fs.stat('./static/eleventy-endpointsdddd.json') + const allEndpointListings = await fs.stat('./static/eleventy-endpoints.json') const currentDirectory = await fs.readdir('./') // console.log('endpointListings', endpointListings[0]) @@ -74,7 +74,12 @@ export async function getStaticProps({ params }) { ...pageListing }, revalidate: ONE_MINUTE - } : { notFound: true } + } : { + notFound: true, + props: { + error: 'falsy pageListing' + }, + } } catch (error) { // The Twitter API most likely died console.error(error)