Skip to content

Commit

Permalink
fix(useBodyScrollLock): type error (#1462)
Browse files Browse the repository at this point in the history
Co-authored-by: Šimon Hrubý <[email protected]>
  • Loading branch information
hrubysi and hrubysimon authored Dec 2, 2024
1 parent 648d8a3 commit 9c9732b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/radix-vue/src/shared/useBodyScrollLock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ function checkOverflowScroll(ele: Element): boolean {
function preventDefault(rawEvent: TouchEvent): boolean {
const e = rawEvent || window.event

const _target = e.target as Element
const _target = e.target

// Do not prevent if element or parentNodes have overflow: scroll set.
if (checkOverflowScroll(_target))
if (_target instanceof Element && checkOverflowScroll(_target))
return false

// Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).
Expand Down

0 comments on commit 9c9732b

Please sign in to comment.