Sfoglia il codice sorgente

fix this.flatMenuKeys error

陈帅 7 anni fa
parent
commit
1cdf566259
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      src/components/SiderMenu/BaseMenu.js

+ 1 - 3
src/components/SiderMenu/BaseMenu.js

@@ -72,9 +72,7 @@ export default class BaseMenu extends PureComponent {
 
   // Get the currently selected menu
   getSelectedMenuKeys = pathname =>
-    urlToList(pathname).map(function(itemPath) {
-      return getMenuMatches(this.flatMenuKeys, itemPath).pop();
-    });
+    urlToList(pathname).map(itemPath => getMenuMatches(this.flatMenuKeys, itemPath).pop());
 
   /**
    * get SubMenu or Item