Skip to content
Snippets Groups Projects
Commit 77b3ab14 authored by Tuukka Turu's avatar Tuukka Turu
Browse files

Add check to breadcrumbs check when layout-content is available

parent 53cf5ad1
No related branches found
No related tags found
No related merge requests found
......@@ -44,10 +44,11 @@ export class HyBreadcrumbs {
breadcrumbsWidth = this.el.offsetWidth + 64;
const layoutContentElement = document.getElementsByClassName('layout-content')[0] as HTMLElement;
const moreButton = document.querySelectorAll('.breadcrumb-item-dropdown-button')[0];
if (breadcrumbsWidth >= layoutContentElement.offsetWidth) {
moreButton.setAttribute('aria-hidden', 'false');
this.adjustBreadcrumbsMenuVisibility();
if (layoutContentElement) {
if (breadcrumbsWidth >= layoutContentElement.offsetWidth) {
moreButton.setAttribute('aria-hidden', 'false');
this.adjustBreadcrumbsMenuVisibility();
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment