Skip to content

Commit

Permalink
change CI comparison operator to a string "true"
Browse files Browse the repository at this point in the history
Signed-off-by: Randy Lau <randychilau@gmail.com>
  • Loading branch information
randychilau committed Jun 20, 2023
1 parent b52d850 commit 139bfdf
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 === true) {
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 === true){
if (process.env.CI === "true"){
const { path, ...rest } = props;

createRedirect({ fromPath: `/${path}/`, toPath: `/${path}`, redirectInBrowser: true, isPermanent: true });
Expand Down

0 comments on commit 139bfdf

Please sign in to comment.