Skip to content

Commit

Permalink
fix(useCycleList): nullish check (vitest-dev#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Feb 16, 2022
1 parent b8a2667 commit aef8a2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useCycleList/index.ts
Expand Up @@ -26,7 +26,7 @@ export interface UseCycleListOptions<T> {
* @see https://vueuse.org/useCycleList
*/
export function useCycleList<T>(list: T[], options?: UseCycleListOptions<T>) {
const state = shallowRef(options?.initialValue || list[0]) as Ref<T>
const state = shallowRef(options?.initialValue ?? list[0]) as Ref<T>

const index = computed<number>({
get() {
Expand Down

0 comments on commit aef8a2b

Please sign in to comment.