Skip to content

Commit 648ed1a

Browse files
brododanielleadams
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 1f50d72 commit 648ed1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/util.md

Lines changed: 1 addition & 1 deletion
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)