From b2a12ee78243e24670744461b8e95469524a6eb3 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 760cd4dd15f..e351d3cce76 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(); ```