release v2.0.0 #4
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue