[core] Fix minor linting error

This commit is contained in:
Ferdinand Thiessen 2021-11-26 01:38:40 +01:00
parent 053fdae384
commit c9df257bbf
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import { AxiosError } from 'axios';
*/
export function isAxiosError(error: unknown, status?: number) {
// Check if it is an axios error (with axios 1.0 `error instanceof AxiosError` will be possible)
if (!error || typeof error !== 'object' || !('isAxiosError' in <object>error)) return false;
if (typeof error !== 'object' || !error || !('isAxiosError' in error)) return false;
// Check status code if status was given
if (status !== undefined)
return (