Skip to content

Commit

Permalink
fix: type fix for getComputedStyle(el), vueuse#3580
Browse files Browse the repository at this point in the history
TypeError: The provided value is not of type 'Element'.
  • Loading branch information
steklopod committed Feb 20, 2024
1 parent 0cd918c commit f75c8b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/useScroll/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ export function useScroll(
if (!window)
return

const el: HTMLElement = (
const el: Element = (
(target instanceof Window)
? (target as Window).document.documentElement
: (target as Document)?.documentElement ?? target
) as HTMLElement
) as Element

const { display, flexDirection } = getComputedStyle(el)

Expand Down

0 comments on commit f75c8b1

Please sign in to comment.