mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
refactor(helpers): optimize the logic of isAxiosError (#3546)
1. add the judgment of null Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -17,4 +17,9 @@ describe('helpers::isAxiosError', function () {
|
||||
expect(isAxiosError(new Error('Boom!')))
|
||||
.toBe(false);
|
||||
});
|
||||
|
||||
it('should return false if the error is null', function () {
|
||||
expect(isAxiosError(null))
|
||||
.toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user