Skip to content

Commit

Permalink
update env CI variable equality value for lhci
Browse files Browse the repository at this point in the history
Signed-off-by: Randy Lau <[email protected]>
  • Loading branch information
randychilau committed Jun 19, 2023
1 parent 81cbf0d commit 6da5ba2
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 @@ -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`;
Expand Down Expand Up @@ -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 });
Expand Down

0 comments on commit 6da5ba2

Please sign in to comment.