2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03:00

refactor: use spread operator instead of '.apply()' (#6938)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Noritaka Kobayashi
2025-07-06 23:59:56 +09:00
committed by GitHub
parent a1d16dd9c5
commit 6161947d9d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -17,7 +17,7 @@ function throttle(fn, freq) {
clearTimeout(timer);
timer = null;
}
fn.apply(null, args);
fn(...args);
}
const throttled = (...args) => {