From 4bfa2bbb20daa4c7298450fed5068bcb79f1fcec Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sat, 8 Apr 2017 16:22:25 +0300 Subject: [PATCH] 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 Reviewed-By: Alexey Orlenko Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock --- doc/api/process.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index 8167bad6ed336c..bd828634a5b143 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -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(); ```