doc: fix confusing example in process.md

PR-URL: https://github.com/nodejs/node/pull/12282
Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
Vse Mozhet Byt authored and Myles Borins committed 2017-04-18 20:02:27 -04:00
1 parent 88f402c4c1
commit 8d1a474ec2
1 file changed
+4 -1
+4 -1
View File
@@ -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();
```