From 648ed1aefa00113ff390136dbd7c96c666a10f8b Mon Sep 17 00:00:00 2001 From: Julian Dax Date: Thu, 13 Apr 2023 00:38:13 +0200 Subject: [PATCH] doc: fix typo in util.types.isNativeError() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Tobias Nießen Reviewed-By: Mohammed Keyvanzadeh --- doc/api/util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.md b/doc/api/util.md index 755c7f5d0d46b0..57db68a0350774 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -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 ```