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 4046280

Browse filesBrowse files
brodotargos
authored andcommitted
doc: fix typo in util.types.isNativeError()
This is a small fix for my recent PR that fixes a typo in the realm example. PR-URL: #47532 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent e4d9585 commit 4046280
Copy full SHA for 4046280

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/util.md‎

Copy file name to clipboardExpand all lines: doc/api/util.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2539,7 +2539,7 @@ for these errors:
25392539
```js
25402540
const vm = require('node:vm');
25412541
const context = vm.createContext({});
2542-
const myError = vm.runInContext('new Error', context);
2542+
const myError = vm.runInContext('new Error()', context);
25432543
console.log(util.types.isNativeError(myError)); // true
25442544
console.log(myError instanceof Error); // false
25452545
```

0 commit comments

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