From 7f93f54131fdcc59f2c3775d7f25d65239200af3 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 Fixes: https://github.com/nodejs/node/issues/12280 --- 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 760cd4dd15fdd1..e351d3cce7695a 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(); ```