fix: use child menu title for work tabs
This commit is contained in:
@@ -76,16 +76,16 @@ const findMenuTrail = (
|
||||
? [...parents, { key: menuKey, title: menu.name }]
|
||||
: parents;
|
||||
|
||||
if (isMenuPathMatch(menu.path, pathname)) {
|
||||
return currentTrail;
|
||||
}
|
||||
|
||||
if (menu.children?.length) {
|
||||
const childTrail = findMenuTrail(menu.children, pathname, currentTrail);
|
||||
if (childTrail.length) {
|
||||
return childTrail;
|
||||
}
|
||||
}
|
||||
|
||||
if (isMenuPathMatch(menu.path, pathname)) {
|
||||
return currentTrail;
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user