Skip to content

Commit

Permalink
fix(gatsby-link): trailing slash undefined check for prod env (#34765)
Browse files Browse the repository at this point in the history
(cherry picked from commit d3f2f5e)
  • Loading branch information
imjoshin committed Feb 8, 2022
1 parent 1f30882 commit 8dae726
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/gatsby-link/src/rewrite-link-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import { withPrefix } from "."
const isAbsolutePath = path => path?.startsWith(`/`)

const getGlobalTrailingSlash = () =>
process.env.NODE_ENV !== `production`
? typeof __TRAILING_SLASH__ !== `undefined`
? __TRAILING_SLASH__
: undefined
: __TRAILING_SLASH__
typeof __TRAILING_SLASH__ !== `undefined` ? __TRAILING_SLASH__ : undefined

function absolutify(path, current) {
// If it's already absolute, return as-is
Expand Down

0 comments on commit 8dae726

Please sign in to comment.