Skip to content

Commit b2a12ee

Browse files
committed
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 fe016c6 commit b2a12ee

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
@@ -1256,9 +1256,12 @@ function maybeSync(arg, cb) {
12561256
This API is hazardous because in the following case:
12571257

12581258
```js
1259-
maybeSync(true, () => {
1259+
const maybeTrue = Math.random() > 0.5;
1260+
1261+
maybeSync(maybeTrue, () => {
12601262
foo();
12611263
});
1264+
12621265
bar();
12631266
```
12641267

0 commit comments

Comments
 (0)