diff options
author | Julian Dax <julian.dax@posteo.de> | 2023-04-13 00:38:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 22:38:13 +0000 |
commit | dee953bb8a1a1436dbc26178184b4eb22805a84b (patch) | |
tree | ed1aa873abd732bd7bc744abc0d32b2426783c08 /doc/api | |
parent | 6dcbf8b6166dff6588c47ebcce97c323b058229d (diff) | |
download | node-new-dee953bb8a1a1436dbc26178184b4eb22805a84b.tar.gz |
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: https://github.com/nodejs/node/pull/47532
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/util.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/util.md b/doc/api/util.md index caf26dcffc..638b142496 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -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 ``` |