diff --git a/src/components/SiderMenu/BaseMenu.js b/src/components/SiderMenu/BaseMenu.js index 76c21bc0b81689e06206d8657c417e5e82a609ce..0fc635dea583d1913c58750945b033a108a110da 100644 --- a/src/components/SiderMenu/BaseMenu.js +++ b/src/components/SiderMenu/BaseMenu.js @@ -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) {