diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-08 16:22:25 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-10 16:16:44 +0300 |
commit | b2a12ee78243e24670744461b8e95469524a6eb3 (patch) | |
tree | 94794769c6e5875bfb59f526c7598fd1c190e892 | |
parent | fe016c6cd99cb8e57fbeaf6dbb8b7c28f2cfeafd (diff) | |
download | node-new-b2a12ee78243e24670744461b8e95469524a6eb3.tar.gz |
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>
-rw-r--r-- | doc/api/process.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/api/process.md b/doc/api/process.md index 760cd4dd15..e351d3cce7 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1256,9 +1256,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(); ``` |