From 6da5ba2f9b7e08687dd5c5230d3267de915fface Mon Sep 17 00:00:00 2001 From: Randy Lau Date: Sun, 18 Jun 2023 22:11:38 -0700 Subject: [PATCH] update env CI variable equality value for lhci Signed-off-by: Randy Lau --- gatsby-node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index aeade5cbd294..f56e14799947 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -11,7 +11,7 @@ const { paginate } = require("gatsby-awesome-pagination"); const { createFilePath } = require("gatsby-source-filesystem"); const config = require("./gatsby-config"); -if (process.env.CI) { +if (process.env.CI === true) { // All process.env.CI conditionals in this file are in place for GitHub Pages, if webhost changes in the future, code may need to be modified or removed. //Replacing '/' would result in empty string which is invalid const replacePath = (url) => (url === "/" || url.includes("/404")) ? url : `${url}.html`; @@ -69,7 +69,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => { const { createPage } = actions; const envCreatePage = (props) => { - if (process.env.CI){ + if (process.env.CI === true){ const { path, ...rest } = props; createRedirect({ fromPath: `/${path}/`, toPath: `/${path}`, redirectInBrowser: true, isPermanent: true });