From cfc83378bca11ff2eca5254b7d79dfe6ff24fa29 Mon Sep 17 00:00:00 2001 From: aswathy-deriv Date: Wed, 17 Jan 2024 13:40:39 +0400 Subject: [PATCH] fix: cloudfare build issue --- gatsby-node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index ac707e37c18..30d994e83eb 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -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 @@ -362,7 +362,7 @@ exports.onCreatePage = ({ page, actions }) => { } }, []) - console.log('allowed_pages', pages) + console.log('pages', pages) deletePage(page) if (isProduction) {