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

fix #2630,Fix problems with first level menu matching

parent deb14330
......@@ -24,10 +24,13 @@ const getIcon = icon => {
return icon;
};
export const getMenuMatches = memoizeOne(
(flatMenuKeys, path) => flatMenuKeys.filter(item => item && pathToRegexp(item).test(path)),
isEqual
);
export const getMenuMatches = (flatMenuKeys, path) =>
flatMenuKeys.filter(item => {
if (item) {
return pathToRegexp(item).test(path);
}
return false;
});
export default class BaseMenu extends PureComponent {
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