mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Try passing props on falsy pageListing
This commit is contained in:
parent
66315cfc40
commit
73ebd03c57
1 changed files with 7 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue