From 728bc66481be883f310a94271491eaed1742ccf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BB=BA=E6=89=98?= Date: Wed, 17 Aug 2022 09:37:37 +0800 Subject: [PATCH] fix: Fix the bug that the error value is not reset --- packages/integrations/useAxios/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/integrations/useAxios/index.ts b/packages/integrations/useAxios/index.ts index f63a8e37ad0..683709074b5 100644 --- a/packages/integrations/useAxios/index.ts +++ b/packages/integrations/useAxios/index.ts @@ -169,6 +169,7 @@ export function useAxios(...args: any[]): OverallUseAxiosReturn & Pr const then: PromiseLike>['then'] = (onFulfilled, onRejected) => waitUntilFinished().then(onFulfilled, onRejected) const execute: OverallUseAxiosReturn['execute'] = (executeUrl: string | AxiosRequestConfig | undefined = url, config: AxiosRequestConfig = {}) => { + error.value = undefined const _url = typeof executeUrl === 'string' ? executeUrl : url ?? ''