Skip to content

Commit

Permalink
fix gatsby v4 compatibility with stage variable
Browse files Browse the repository at this point in the history
replace process.env.GATSBY_BUILD_STAGE with process.env.BUILD_STAGE
gatsbyjs/gatsby#33501
  • Loading branch information
d4v1d82 committed Oct 22, 2021
1 parent fb243c9 commit 67aef1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gatsby-browser.js
Expand Up @@ -7,7 +7,7 @@ export const replaceHydrateFunction =
const renderFn =
typeof options.useHydrate === "undefined"
? // Using ReactDOM.hydrate on develop will throw an error in console
process.env.GATSBY_BUILD_STAGE.includes("develop")
process.env.BUILD_STAGE.includes("develop")
? render
: hydrate
: !!options.useHydrate
Expand Down

0 comments on commit 67aef1f

Please sign in to comment.