Skip to content

Commit

Permalink
fix: cloudfare build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aswathy-deriv committed Jan 17, 2024
1 parent 8c51df2 commit cfc8337
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ exports.onCreatePage = ({ page, actions }) => {
const { deletePage } = actions
const isProduction = process.env.GATSBY_ENV === 'production'
const pagesToBuild = process.env.GATSBY_BUILD_PAGES
const allowed_pages = ['', pagesToBuild.split(',')]
const allowed_pages = ['', pagesToBuild?.split(',')]
const pages = allowed_pages.reduce((result, Item) => {
if (Array.isArray(Item)) {
// Flatten the nested array and add the '/' prefix
Expand All @@ -362,7 +362,7 @@ exports.onCreatePage = ({ page, actions }) => {
}
}, [])

console.log('allowed_pages', pages)
console.log('pages', pages)

deletePage(page)
if (isProduction) {
Expand Down

0 comments on commit cfc8337

Please sign in to comment.