Skip to content

Commit

Permalink
simplify check to avoid instanceof
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcosta7 committed Oct 31, 2023
1 parent d5bf940 commit 1589e83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/utils/isNodeException.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 1589e83

Please sign in to comment.