Skip to content

Commit

Permalink
fix: fix args
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Jul 6, 2023
1 parent aae87f0 commit e312004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export type UseAxleInstance<D, R, P> = [
]

export interface CreateUseAxleOptions {
onTransform?(response: any, prev: any): any
onTransform?(response: any, refs: any): any
}

export function createUseAxle(options: CreateUseAxleOptions = {}) {
Expand Down Expand Up @@ -118,7 +118,7 @@ export function createUseAxle(options: CreateUseAxleOptions = {}) {
...options.config,
})

data.value = onTransform(response as R, data.value)
data.value = onTransform(response as R, refs)
error.value = undefined
onSuccess(response as R, refs)
loading.value = false
Expand Down

0 comments on commit e312004

Please sign in to comment.