diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index ae3845c0..618f14a9 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -44,8 +44,7 @@ service.interceptors.request.use( // 是否需要设置 token let isToken = (config!.headers || {}).isToken === false whiteList.some((v) => { - if (config.url) { - config.url.indexOf(v) > -1 + if (config.url && config.url.indexOf(v) > -1) { return (isToken = false) } })