Skip to content

Commit

Permalink
Docs: Fix misleading console.log output example (vercel#41096)
Browse files Browse the repository at this point in the history
The docs have a misleading `console.log` output for the input
`process.env` that doesn't display all the variables on edge runtime.
The example shows an output of a supposed object with all the
environment variables, but it does this when logging a specific
variable.

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
  • Loading branch information
p13lgst authored and BowlingX committed Oct 5, 2022
1 parent 936a708 commit d8c0932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api-reference/edge-runtime.md
Expand Up @@ -121,7 +121,7 @@ Running `console.log` on `process.env` **will not** show all your Environment Va
console.log(process.env)
// { NEXT_RUNTIME: 'edge' }
console.log(process.env.TEST_VARIABLE)
// { NEXT_RUNTIME: 'edge', TEST_VARIABLE: 'value' }
// value
```

## Unsupported APIs
Expand Down

0 comments on commit d8c0932

Please sign in to comment.