Skip to content

Commit

Permalink
fix(useCycleList): correctly wrap list with ref (#2988)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
fan5530 and antfu committed Apr 18, 2023
1 parent d6d92f3 commit 659b2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useCycleList/index.ts
Expand Up @@ -32,7 +32,7 @@ export function useCycleList<T>(list: MaybeRefOrGetter<T[]>, options?: UseCycleL

const index = computed<number>({
get() {
const targetList = toValue<T[]>(list)
const targetList = listRef.value

let index = options?.getIndexOf
? options.getIndexOf(state.value, targetList)
Expand Down

0 comments on commit 659b2c9

Please sign in to comment.