Skip to content

Commit

Permalink
fix(ui5-side-navigation): remove inappropriate exclamation mark usage
Browse files Browse the repository at this point in the history
fixes: #10714
  • Loading branch information
LidiyaGeorgieva committed Feb 4, 2025
1 parent 0ebc0f4 commit 8624af0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/fiori/src/SideNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,17 +492,19 @@ class SideNavigation extends UI5Element {

let itemDomRef;

if (isInstanceOfSideNavigationItemBase(item)) {
itemDomRef = item.getDomRef()!;
if (isInstanceOfSideNavigationItemBase(item) && item.getDomRef()) {
itemDomRef = item.getDomRef();
} else {
itemDomRef = item;
}

const { marginTop, marginBottom } = window.getComputedStyle(itemDomRef);
itemsHeight += itemDomRef.offsetHeight + parseFloat(marginTop) + parseFloat(marginBottom);
if (itemDomRef) {
const { marginTop, marginBottom } = window.getComputedStyle(itemDomRef);
itemsHeight += itemDomRef.offsetHeight + parseFloat(marginTop) + parseFloat(marginBottom);

if (itemsHeight > listHeight) {
item.classList.add("ui5-sn-item-hidden");
if (itemsHeight > listHeight) {
item.classList.add("ui5-sn-item-hidden");
}
}
});

Expand Down

0 comments on commit 8624af0

Please sign in to comment.