Skip to content

Commit

Permalink
improve js
Browse files Browse the repository at this point in the history
  • Loading branch information
emeryro committed Jul 4, 2023
1 parent 881018c commit c1b438a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,15 @@ export class SiteHeader {
this.languageLink.setAttribute('aria-expanded', 'true');

// Check total width, and change display if needed
this.languageListEu.parentNode.classList.remove(
'ecl-site-header__language-content--stack'
);
if (this.languageListEu) {
this.languageListEu.parentNode.classList.remove(
'ecl-site-header__language-content--stack'
);
} else if (this.languageListNonEu) {
this.languageListNonEu.parentNode.classList.remove(
'ecl-site-header__language-content--stack'
);
}
let popoverRect = this.languageListOverlay.getBoundingClientRect();
const containerRect = this.container.getBoundingClientRect();

Expand Down

0 comments on commit c1b438a

Please sign in to comment.