Skip to content

Commit

Permalink
doc: fix confusing example in process.md
Browse files Browse the repository at this point in the history
PR-URL: #12282
Fixes: #12280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
  • Loading branch information
vsemozhetbyt authored and MylesBorins committed Apr 18, 2017
1 parent 663a1ec commit 4bfa2bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1257,9 +1257,12 @@ function maybeSync(arg, cb) {
This API is hazardous because in the following case:

```js
maybeSync(true, () => {
const maybeTrue = Math.random() > 0.5;

maybeSync(maybeTrue, () => {
foo();
});

bar();
```

Expand Down

0 comments on commit 4bfa2bb

Please sign in to comment.