Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8d1a474

Browse filesBrowse files
vsemozhetbytMylesBorins
authored andcommitted
doc: fix confusing example in process.md
PR-URL: #12282 Fixes: #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>
1 parent 88f402c commit 8d1a474
Copy full SHA for 8d1a474

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/process.md‎

Copy file name to clipboardExpand all lines: doc/api/process.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1257,9 +1257,12 @@ function maybeSync(arg, cb) {
12571257
This API is hazardous because in the following case:
12581258

12591259
```js
1260-
maybeSync(true, () => {
1260+
const maybeTrue = Math.random() > 0.5;
1261+
1262+
maybeSync(maybeTrue, () => {
12611263
foo();
12621264
});
1265+
12631266
bar();
12641267
```
12651268

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.