2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: use fallback group instead of first

This commit is contained in:
18alantom 2021-12-09 14:36:42 +05:30
parent 5c8976ba1b
commit 415bf0e047

View File

@ -133,6 +133,7 @@ export default {
routeTo,
setActiveGroup() {
const { fullPath } = this.$router.currentRoute;
const fallBackGroup = this.activeGroup;
this.activeGroup = this.groups.find((g) => {
if (fullPath.startsWith(g.route) && g.route !== '/') {
return true;
@ -154,7 +155,7 @@ export default {
});
if (!this.activeGroup) {
this.activeGroup = this.groups[0];
this.activeGroup = fallBackGroup || this.groups[0];
}
},
itemActiveClass(item) {