Skip to content

Commit 4046280

Browse 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 <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
1 parent e4d9585 commit 4046280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/util.md

+1-1
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)