txb 1 year ago
parent
commit
0befd59203
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/components/TagView/index.jsx

+ 3
- 0
src/components/TagView/index.jsx View File

@@ -40,6 +40,9 @@ const TagView = ({ children, home, current }) => {
const initTags = (routeContext) => {
if (tagList.length === 0 && routeContext.menuData) {
const firstTag = routeContext.menuData.filter((el) => el.path === home)[0];
if (!firstTag) {
firstTag = routeContext.menuData[0];
}
const title = firstTag.name;
const path = firstTag.path;
history.push({ pathname: firstTag.path, query: firstTag.query });


Loading…
Cancel
Save