From 1589e8349bfa5d9bb45254b14a0c5af269141f9d Mon Sep 17 00:00:00 2001 From: Matthew Costabile Date: Tue, 31 Oct 2023 21:31:16 +0000 Subject: [PATCH] simplify check to avoid instanceof --- src/node/utils/isNodeException.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/utils/isNodeException.ts b/src/node/utils/isNodeException.ts index af276201f..d66686ede 100644 --- a/src/node/utils/isNodeException.ts +++ b/src/node/utils/isNodeException.ts @@ -6,5 +6,5 @@ export function isNodeException( error: unknown, ): error is NodeJS.ErrnoException { - return !!error && typeof error === 'object' && 'code' in error + return !!error && typeof error === 'object' && 'code' in error }