Procházet zdrojové kódy

feat: Routing is in the root directory can also matchs. (#3364)

In před 7 roky
rodič
revize
3ee45d4c86
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/components/SiderMenu/SiderMenuUtils.js

+ 2 - 1
src/components/SiderMenu/SiderMenuUtils.js

@@ -35,5 +35,6 @@ export const getDefaultCollapsedSubMenus = props => {
   } = props;
   return urlToList(pathname)
     .map(item => getMenuMatches(flatMenuKeys, item)[0])
-    .filter(item => item);
+    .filter(item => item)
+    .reduce((acc, curr) => [...acc, curr], ['/']);
 };