Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 20, 2024
1 parent 2becec2 commit 801181e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/useScroll/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { computed, reactive, ref } from 'vue-demi'
import type { MaybeRefOrGetter } from '@vueuse/shared'
import { noop, toValue, tryOnMounted, useDebounceFn, useThrottleFn } from '@vueuse/shared'
import { useEventListener } from '../useEventListener'
import type { MaybeElement, MaybeElementRef } from '../unrefElement'

Check failure on line 5 in packages/core/useScroll/index.ts

View workflow job for this annotation

GitHub Actions / lint

'MaybeElement' is defined but never used

Check failure on line 5 in packages/core/useScroll/index.ts

View workflow job for this annotation

GitHub Actions / test (16.x)

'MaybeElement' is declared but never used.

Check failure on line 5 in packages/core/useScroll/index.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

'MaybeElement' is declared but never used.

Check failure on line 5 in packages/core/useScroll/index.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

'MaybeElement' is declared but never used.
import { unrefElement } from '../unrefElement'
import type { ConfigurableWindow } from '../_configurable'
import { defaultWindow } from '../_configurable'

Expand Down Expand Up @@ -260,7 +262,7 @@ export function useScroll(

tryOnMounted(() => {
try {
const _element = unrefElement(element)
const _element = unrefElement(element as MaybeElementRef) // This can be a window/document
if (!_element)
return
setArrivedState(_element)
Expand Down

0 comments on commit 801181e

Please sign in to comment.