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 targos committed May 2, 2023
1 parent e4d9585 commit 4046280
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 @@ -2539,7 +2539,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 4046280

Please sign in to comment.