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: nodejs/node#12282
Fixes: nodejs/node#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 andrew749 committed Jul 19, 2017
1 parent 1cb3cea commit 0546d48
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 0546d48

Please sign in to comment.