From 1875ecf1923a8e5ef7029c13056405b56cabc83f Mon Sep 17 00:00:00 2001 From: tischsoic Date: Wed, 21 Feb 2024 07:26:22 +0100 Subject: [PATCH] IBX-7804: Fix dropdown offsetHeight error when ibexa-main-header not present --- src/bundle/ui-dev/src/modules/common/dropdown/dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundle/ui-dev/src/modules/common/dropdown/dropdown.js b/src/bundle/ui-dev/src/modules/common/dropdown/dropdown.js index 90f5b61622..fa29aea84d 100644 --- a/src/bundle/ui-dev/src/modules/common/dropdown/dropdown.js +++ b/src/bundle/ui-dev/src/modules/common/dropdown/dropdown.js @@ -106,7 +106,7 @@ const Dropdown = ({ itemsStyles.maxHeight = window.innerHeight - bottom - ITEMS_LIST_SITE_MARGIN; } else { const headerContainer = document.querySelector('.ibexa-main-header'); - const headerHeight = headerContainer.offsetHeight; + const headerHeight = headerContainer?.offsetHeight ?? 0; itemsStyles.top = top - ITEMS_LIST_WIDGET_MARGIN; itemsStyles.maxHeight = top - headerHeight - ITEMS_LIST_SITE_MARGIN;