Skip to content

Commit

Permalink
fix: typo in isStaging in with-env example (#11305)
Browse files Browse the repository at this point in the history
* fix: typo in `isStaging` in `with-env` example

- add missing `phase ===` statement when checking for _staging_ env in `isStaging`

* Update examples/with-env-from-next-config-js/next.config.js

* style: fix prettier issue in example `with-env-from-next-config-js`

Co-authored-by: Luis Alvarez D <luis@zeit.co>
  • Loading branch information
nicolasrouanne and Luis Alvarez D authored Mar 24, 2020
1 parent db57ad3 commit ed06434
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/with-env-from-next-config-js/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = phase => {
// when `next build` or `npm run build` is used
const isProd = phase === PHASE_PRODUCTION_BUILD && process.env.STAGING !== '1'
// when `next build` or `npm run build` is used
const isStaging = PHASE_PRODUCTION_BUILD && process.env.STAGING === '1'
const isStaging =
phase === PHASE_PRODUCTION_BUILD && process.env.STAGING === '1'

console.log(`isDev:${isDev} isProd:${isProd} isStaging:${isStaging}`)

Expand Down

0 comments on commit ed06434

Please sign in to comment.