Commit f473b000 authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

fix #2630,Fix problems with first level menu matching

parent deb14330
...@@ -24,10 +24,13 @@ const getIcon = icon => { ...@@ -24,10 +24,13 @@ const getIcon = icon => {
return icon; return icon;
}; };
export const getMenuMatches = memoizeOne( export const getMenuMatches = (flatMenuKeys, path) =>
(flatMenuKeys, path) => flatMenuKeys.filter(item => item && pathToRegexp(item).test(path)), flatMenuKeys.filter(item => {
isEqual if (item) {
); return pathToRegexp(item).test(path);
}
return false;
});
export default class BaseMenu extends PureComponent { export default class BaseMenu extends PureComponent {
constructor(props) { constructor(props) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment