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 italoacasas committed Apr 10, 2017
1 parent 37568c0 commit 3b765f5
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 @@ -1243,9 +1243,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 3b765f5

Please sign in to comment.