Skip to content

Commit

Permalink
add missing await to setupDevPlatform call in next-dev readme (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored Feb 20, 2024
1 parent 90e140c commit be1ab75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal-packages/next-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ export default nextConfig;
// we only need to use the utility during development so we can check NODE_ENV
// (note: this check is recommended but completely optional)
if (process.env.NODE_ENV === 'development') {
// we simply need to call the utility
setupDevPlatform();
// `await`ing the call is not necessary but it helps making sure that the setup has succeeded.
// If you cannot use top level awaits you could use the following to avoid an unhandled rejection:
// `setupDevPlatform().catch(e => console.error(e));`
await setupDevPlatform();
}
```

Expand Down

0 comments on commit be1ab75

Please sign in to comment.