mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Change isNaN to Number.isNaN
* Change isNaN to Number.isNaN * == to === --------- Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b5b7760373
commit
a989ccdc1a
Vendored
+2
-2
@@ -8,10 +8,10 @@
|
|||||||
function _typeof(obj) {
|
function _typeof(obj) {
|
||||||
"@babel/helpers - typeof";
|
"@babel/helpers - typeof";
|
||||||
|
|
||||||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
return _typeof = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function (obj) {
|
||||||
return typeof obj;
|
return typeof obj;
|
||||||
} : function (obj) {
|
} : function (obj) {
|
||||||
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
return obj && "function" === typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||||
}, _typeof(obj);
|
}, _typeof(obj);
|
||||||
}
|
}
|
||||||
function _classCallCheck(instance, Constructor) {
|
function _classCallCheck(instance, Constructor) {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -3027,7 +3027,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|||||||
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
||||||
const timeout = parseInt(config.timeout, 10);
|
const timeout = parseInt(config.timeout, 10);
|
||||||
|
|
||||||
if (isNaN(timeout)) {
|
if (Number.isNaN(timeout)) {
|
||||||
reject(new AxiosError(
|
reject(new AxiosError(
|
||||||
'error trying to parse `config.timeout` to int',
|
'error trying to parse `config.timeout` to int',
|
||||||
AxiosError.ERR_BAD_OPTION_VALUE,
|
AxiosError.ERR_BAD_OPTION_VALUE,
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|||||||
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
||||||
const timeout = parseInt(config.timeout, 10);
|
const timeout = parseInt(config.timeout, 10);
|
||||||
|
|
||||||
if (isNaN(timeout)) {
|
if (Number.isNaN(timeout)) {
|
||||||
reject(new AxiosError(
|
reject(new AxiosError(
|
||||||
'error trying to parse `config.timeout` to int',
|
'error trying to parse `config.timeout` to int',
|
||||||
AxiosError.ERR_BAD_OPTION_VALUE,
|
AxiosError.ERR_BAD_OPTION_VALUE,
|
||||||
|
|||||||
Reference in New Issue
Block a user