Skip to content

Commit 924dc90

Browse files
brodoMoLow
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 c7b898d commit 924dc90

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
@@ -2528,7 +2528,7 @@ for these errors:
25282528
```js
25292529
const vm = require('node:vm');
25302530
const context = vm.createContext({});
2531-
const myError = vm.runInContext('new Error', context);
2531+
const myError = vm.runInContext('new Error()', context);
25322532
console.log(util.types.isNativeError(myError)); // true
25332533
console.log(myError instanceof Error); // false
25342534
```

0 commit comments

Comments
 (0)