Explorar el Código

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

In hace 7 años
padre
commit
3ee45d4c86
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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], ['/']);
 };