Skip to content

Commit

Permalink
fix: useBodyScrollLock type error
Browse files Browse the repository at this point in the history
  • Loading branch information
hrubysimon committed Nov 28, 2024
1 parent 42a0b02 commit ad7bd92
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 ad7bd92

Please sign in to comment.