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 });