Update isHttpErrorWithExtraMessage

This commit is contained in:
Mihovil Ilakovac 2024-10-28 13:11:45 +01:00
parent 465856c220
commit 5c329a4c15

View File

@ -39,5 +39,5 @@ function getRedirectUriForError(error: string): URL {
}
function isHttpErrorWithExtraMessage(error: HttpError): error is HttpError & { data: { message: string } } {
return error.data ? typeof (error.data as any).message === 'string' : false;
return !!error.data && typeof (error.data as any).message === 'string';
}