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:
parent
5c8976ba1b
commit
415bf0e047
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user