fix: remove axios ignoreRepeatRequest config (#389)

This commit is contained in:
PY 2023-01-03 15:54:46 +08:00 committed by GitHub
parent 573efe6cd3
commit 02ea472748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,10 +64,7 @@ export class VAxios {
// 请求配置处理
this.instance.interceptors.request.use((config: AxiosRequestConfig) => {
const {
headers: { ignoreRepeatRequest },
} = config;
const ignoreRepeat = ignoreRepeatRequest ?? this.options.requestOptions?.ignoreRepeatRequest;
const ignoreRepeat = this.options.requestOptions?.ignoreRepeatRequest;
if (!ignoreRepeat) axiosCanceler.addPending(config);
if (requestInterceptors && isFunction(requestInterceptors)) {