From e471f76c7a7b85a5f069b433b59610d66e979fca Mon Sep 17 00:00:00 2001 From: mm <25961416+mlmoravek@users.noreply.github.com> Date: Mon, 26 Feb 2024 19:05:20 +0100 Subject: [PATCH] fix: check scrolling parent not null (#813) --- packages/oruga/src/components/utils/PositionWrapper.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/oruga/src/components/utils/PositionWrapper.vue b/packages/oruga/src/components/utils/PositionWrapper.vue index 69d83f55c..cbe0b141f 100644 --- a/packages/oruga/src/components/utils/PositionWrapper.vue +++ b/packages/oruga/src/components/utils/PositionWrapper.vue @@ -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,