Skip to content

Commit

Permalink
fix(app-navigation-main-mobile): second level if no children (actual …
Browse files Browse the repository at this point in the history
…child element) (#1660)
  • Loading branch information
Arturo Castillo Delgado authored Mar 16, 2023
1 parent e17f3f8 commit ccc5749
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class MainNavigationMobile {

childMenuPage() {
const section =
this.selected && this.selected.children ? this.selected : this.parent;
this.selected && hasChildren(this.selected) ? this.selected : this.parent;

const { selected, parent } = findSelected(
this.navigation,
Expand Down Expand Up @@ -141,7 +141,7 @@ export class MainNavigationMobile {
<li class="main-navigation-mobile__child-menu-item">
<a
aria-current={isActive(child) ? 'true' : 'false'}
aria-haspopup={child.children ? 'true' : 'false'}
aria-haspopup={hasChildren(child) ? 'true' : 'false'}
class={`main-navigation-mobile__child-menu-item-link ${
isActive(child) ? 'selected' : ''
}`}
Expand Down Expand Up @@ -170,7 +170,7 @@ export class MainNavigationMobile {
<div class="main-navigation-mobile__child-menu-item-wrapper">
<span>{child.name}</span>
{isActive(child) && <span class="sr-only">active</span>}
{child.children && (
{hasChildren(child) && (
<scale-icon-navigation-right></scale-icon-navigation-right>
)}
</div>
Expand Down

0 comments on commit ccc5749

Please sign in to comment.