bug: Fixes error with the secondary menu. (#3524)

This commit is contained in:
Sivin Varghese 2021-12-08 14:20:59 +05:30 committed by GitHub
parent f5d79ffe58
commit 714c10dc66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
<template>
<div v-if="menuConfig.menuItems.length" class="main-nav secondary-menu">
<div v-if="hasSecondaryMenu" class="main-nav secondary-menu">
<transition-group name="menu-list" tag="ul" class="menu vertical">
<secondary-nav-item
v-for="menuItem in accessibleMenuItems"
@ -50,6 +50,9 @@ export default {
},
},
computed: {
hasSecondaryMenu() {
return this.menuConfig.menuItems && this.menuConfig.menuItems.length;
},
accessibleMenuItems() {
if (!this.currentRole) {
return [];