From 41a115b19bbe5bbc5157536170ab570a87bf5660 Mon Sep 17 00:00:00 2001 From: aswathy-deriv Date: Wed, 17 Jan 2024 13:50:03 +0400 Subject: [PATCH] fix: added the split function back --- gatsby-node.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gatsby-node.js b/gatsby-node.js index 30d994e83eb..bb7a26182ff 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -350,7 +350,8 @@ 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