Skip to content

Commit

Permalink
fix(useAxios): bail out on request abort (#3394)
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnli committed Nov 9, 2023
1 parent d98468d commit 151f9b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/integrations/useAxios/index.ts
Expand Up @@ -225,6 +225,8 @@ export function useAxios<T = any, R = AxiosResponse<T>, D = any>(...args: any[])

instance(_url, { ...defaultConfig, ...typeof executeUrl === 'object' ? executeUrl : config, cancelToken: cancelToken.token })
.then((r: any) => {
if (isAborted.value)
return
response.value = r
const result = r.data
data.value = result
Expand Down

0 comments on commit 151f9b0

Please sign in to comment.