Skip to content

Commit

Permalink
fix: remove type casting in useBodyScrollLock (#1629)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrubysi authored Feb 19, 2025
1 parent 03826eb commit 3f9aad0
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 @@ -119,9 +119,9 @@ function checkOverflowScroll(ele: Element): boolean {
return true
}
else {
const parent = ele.parentNode as Element
const parent = ele.parentNode

if (!parent || parent.tagName === 'BODY')
if (!(parent instanceof Element) || parent.tagName === 'BODY')
return false

return checkOverflowScroll(parent)
Expand Down

0 comments on commit 3f9aad0

Please sign in to comment.