From 65ad840b058e57fa0de3efeff593da203079bf7e Mon Sep 17 00:00:00 2001 From: Ekszz Date: Wed, 27 Feb 2019 14:52:09 +0800 Subject: [PATCH] fix the problem that breadcrumbNameMap does not contain hidden menus. (#3606) --- src/models/menu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/models/menu.js b/src/models/menu.js index f0499163..55e7909c 100644 --- a/src/models/menu.js +++ b/src/models/menu.js @@ -104,8 +104,9 @@ export default { effects: { *getMenuData({ payload }, { put }) { const { routes, authority } = payload; - const menuData = filterMenuData(memoizeOneFormatter(routes, authority)); - const breadcrumbNameMap = memoizeOneGetBreadcrumbNameMap(menuData); + const originalMenuData = memoizeOneFormatter(routes, authority); + const menuData = filterMenuData(originalMenuData); + const breadcrumbNameMap = memoizeOneGetBreadcrumbNameMap(originalMenuData); yield put({ type: 'save', payload: { menuData, breadcrumbNameMap, routerData: routes }, -- GitLab