Skip to content

Commit

Permalink
fix(useAxios): reset error on execute (#2095)
Browse files Browse the repository at this point in the history
Co-authored-by: 杨建托 <yang.jiantuo@h3c.com>
  • Loading branch information
flyingTodream and 杨建托 committed Aug 23, 2022
1 parent 06ad02b commit 23d186e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/integrations/useAxios/index.ts
Expand Up @@ -169,6 +169,7 @@ export function useAxios<T = any>(...args: any[]): OverallUseAxiosReturn<T> & Pr
const then: PromiseLike<OverallUseAxiosReturn<T>>['then'] = (onFulfilled, onRejected) =>
waitUntilFinished().then(onFulfilled, onRejected)
const execute: OverallUseAxiosReturn<T>['execute'] = (executeUrl: string | AxiosRequestConfig | undefined = url, config: AxiosRequestConfig = {}) => {
error.value = undefined
const _url = typeof executeUrl === 'string'
? executeUrl
: url ?? ''
Expand Down

0 comments on commit 23d186e

Please sign in to comment.