diff --git a/lib/core/Axios.js b/lib/core/Axios.js index cff383e..67ba0e7 100644 --- a/lib/core/Axios.js +++ b/lib/core/Axios.js @@ -153,8 +153,8 @@ class Axios { if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); diff --git a/lib/helpers/throttle.js b/lib/helpers/throttle.js index e256272..73e263d 100644 --- a/lib/helpers/throttle.js +++ b/lib/helpers/throttle.js @@ -17,7 +17,7 @@ function throttle(fn, freq) { clearTimeout(timer); timer = null; } - fn.apply(null, args); + fn(...args); } const throttled = (...args) => {