Skip to content

Commit

Permalink
fix(useFetch): isFinished,isFetching to ComputedRef
Browse files Browse the repository at this point in the history
  • Loading branch information
baboon-king committed Feb 19, 2024
1 parent cea5078 commit 589033e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/useFetch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface UseFetchReturn<T> {
/**
* Indicates if the fetch request has finished
*/
isFinished: Ref<boolean>
isFinished: ComputedRef<boolean>

/**
* The statusCode of the HTTP fetch response
Expand All @@ -33,7 +33,7 @@ export interface UseFetchReturn<T> {
/**
* Indicates if the request is currently being fetched.
*/
isFetching: Ref<boolean>
isFetching: ComputedRef<boolean>

/**
* Indicates if the fetch request is able to be aborted
Expand Down Expand Up @@ -528,12 +528,12 @@ export function useFetch<T>(url: MaybeRefOrGetter<string>, ...args: any[]): UseF
)

const shell: UseFetchReturn<T> = {
isFinished,
isFinished: computed(() => isFinished.value),
statusCode,
response,
error,
data,
isFetching,
isFetching: computed(() => isFetching.value),
canAbort,
aborted,
abort,
Expand Down

0 comments on commit 589033e

Please sign in to comment.