Make type checking all use typeof

This commit is contained in:
Robert
2023-03-15 10:21:12 +00:00
parent 47fa752c5c
commit 969fdb6337

View File

@@ -78,9 +78,8 @@ export interface ErrorLike {
function isErrorLike(error: any): error is ErrorLike {
if (
error.message !== undefined &&
typeof error.message === "string" &&
(error.stack === undefined || typeof error.stack === "string")
(typeof error.stack === "undefined" || typeof error.stack === "string")
) {
return true;
}