From 3b765f536631807f2b1ea72408d432359ef1b6e9 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 0d0615e2fa7697..e10271060ff5ff 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1243,9 +1243,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(); ```