Skip to content

Commit

Permalink
fix(resize-observer): correctly normalize observed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed Jun 27, 2024
1 parent 84beb5f commit 9349d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui/src/composables/useResizeObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const normalizeElements = <T>(elements: MaybeRef<T>[] | Ref<MaybeArray<T>>) => {
? elements
: Array.isArray(elements.value)
? elements.value
: [elements.value]
: [unref(elements)] as T[]
}

export const useResizeObserver = <T extends HTMLElement | undefined>(elementsList: MaybeRef<T>[] | Ref<MaybeArray<T>>, cb: ResizeObserverCallback) => {
Expand Down

0 comments on commit 9349d36

Please sign in to comment.