We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8c344b commit 83e16b9Copy full SHA for 83e16b9
src/node/util.ts
@@ -482,7 +482,7 @@ export function escapeHtml(unsafe: string): string {
482
* it has a .code property.
483
*/
484
export function isNodeJSErrnoException(error: unknown): error is NodeJS.ErrnoException {
485
- return error instanceof Error && (error as NodeJS.ErrnoException).code !== undefined
+ return error !== undefined && (error as NodeJS.ErrnoException).code !== undefined
486
}
487
488
// TODO: Replace with proper templating system.
0 commit comments