From 404628047547f8da536f9f85a9123e2cffc3b33f 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 f178078264875f..cd3a3ea1a3adbe 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 ```