Skip to content

Commit

Permalink
fix: check scrolling parent not null (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek committed Feb 26, 2024
1 parent b1b6586 commit e471f76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/oruga/src/components/utils/PositionWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ function addHandler(): void {
// get parent container
scrollingParent.value = getScrollingParent(unrefElement(props.content));
// set event listener
if (scrollingParent.value !== document.documentElement) {
if (
scrollingParent.value &&
scrollingParent.value !== document.documentElement
) {
scrollingParent.value.addEventListener(
"scroll",
updatePositioning,
Expand Down

0 comments on commit e471f76

Please sign in to comment.