Skip to content

Commit

Permalink
fix(useAsyncState): isLoading not reset (#1518)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamenco committed Apr 23, 2022
1 parent e2a9ac3 commit a8fd617
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/useAsyncState/index.ts
Expand Up @@ -102,8 +102,10 @@ export function useAsyncState<Data, Shallow extends boolean = true>(
error.value = e
onError(e)
}
finally {
isLoading.value = false
}

isLoading.value = false
return state.value as Data
}

Expand Down

0 comments on commit a8fd617

Please sign in to comment.