Skip to content

Commit

Permalink
fix(useAxios): normalize isCanceled flag (#1585)
Browse files Browse the repository at this point in the history
Co-authored-by: JB Aubrée <jb.aubree@digitsole.com>
  • Loading branch information
jbaubree and JB Aubrée committed May 16, 2022
1 parent 8ba3b9d commit b833957
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/integrations/useAxios/index.ts
Expand Up @@ -65,9 +65,15 @@ export interface UseAxiosReturn<T> {
cancel: (message?: string | undefined) => void

/**
* abort aborted
* isAborted alias
* @deprecated use `isCanceled` instead
*/
canceled: Ref<boolean>

/**
* isAborted alias
*/
isCanceled: Ref<boolean>
}
export interface StrictUseAxiosReturn<T> extends UseAxiosReturn<T> {
/**
Expand Down Expand Up @@ -192,6 +198,7 @@ export function useAxios<T = any>(...args: any[]): OverallUseAxiosReturn<T> & Pr
isAborted,
canceled: isAborted,
aborted: isAborted,
isCanceled: isAborted,
abort,
execute,
} as OverallUseAxiosReturn<T>
Expand Down

0 comments on commit b833957

Please sign in to comment.