Skip to content

Commit

Permalink
doc: fix typo in util.types.isNativeError()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
brodo authored and MoLow committed Jul 6, 2023
1 parent c7b898d commit 924dc90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ for these errors:
```js
const vm = require('node:vm');
const context = vm.createContext({});
const myError = vm.runInContext('new Error', context);
const myError = vm.runInContext('new Error()', context);
console.log(util.types.isNativeError(myError)); // true
console.log(myError instanceof Error); // false
```
Expand Down

0 comments on commit 924dc90

Please sign in to comment.