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
  • Loading branch information
imjoshin authored and marvinjude committed Feb 9, 2022
1 parent 11aa642 commit e16da72
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 e16da72

Please sign in to comment.