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:
committed by
GitHub
parent
a1d16dd9c5
commit
6161947d9d
+2
-2
@@ -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);
|
||||
|
||||
@@ -17,7 +17,7 @@ function throttle(fn, freq) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
fn.apply(null, args);
|
||||
fn(...args);
|
||||
}
|
||||
|
||||
const throttled = (...args) => {
|
||||
|
||||
Reference in New Issue
Block a user