2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +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:
Mustafa Ateş Uzun
2023-08-30 21:47:01 +03:00
committed by GitHub
parent b5b7760373
commit a989ccdc1a
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -8,10 +8,10 @@
function _typeof(obj) {
"@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;
} : 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);
}
function _classCallCheck(instance, Constructor) {
+1 -1
View File
@@ -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.
const timeout = parseInt(config.timeout, 10);
if (isNaN(timeout)) {
if (Number.isNaN(timeout)) {
reject(new AxiosError(
'error trying to parse `config.timeout` to int',
AxiosError.ERR_BAD_OPTION_VALUE,
+1 -1
View File
@@ -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.
const timeout = parseInt(config.timeout, 10);
if (isNaN(timeout)) {
if (Number.isNaN(timeout)) {
reject(new AxiosError(
'error trying to parse `config.timeout` to int',
AxiosError.ERR_BAD_OPTION_VALUE,