Skip to content

Commit abddeb9

Browse files
committed
fix: update isNodeJSErrnoException
1 parent 4619786 commit abddeb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export function escapeHtml(unsafe: string): string {
482482
* it has a .code property.
483483
*/
484484
export function isNodeJSErrnoException(error: unknown): error is NodeJS.ErrnoException {
485-
return error instanceof Error && (error as NodeJS.ErrnoException).code !== undefined
485+
return error !== undefined && (error as NodeJS.ErrnoException).code !== undefined
486486
}
487487

488488
// TODO: Replace with proper templating system.

0 commit comments

Comments
 (0)