Skip to content

Commit 3b765f5

Browse files
vsemozhetbytitaloacasas
authored andcommittedApr 10, 2017
doc: fix confusing example in process.md
PR-URL: #12282 Fixes: #12280 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 37568c0 commit 3b765f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎doc/api/process.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,12 @@ function maybeSync(arg, cb) {
12431243
This API is hazardous because in the following case:
12441244

12451245
```js
1246-
maybeSync(true, () => {
1246+
const maybeTrue = Math.random() > 0.5;
1247+
1248+
maybeSync(maybeTrue, () => {
12471249
foo();
12481250
});
1251+
12491252
bar();
12501253
```
12511254

0 commit comments

Comments
 (0)
Please sign in to comment.