From 3e9a51e5bfe994ef85322b26b6df302dafb26741 Mon Sep 17 00:00:00 2001 From: Ekszz Date: Tue, 26 Feb 2019 20:20:00 +0800 Subject: [PATCH] fix the problem that breadcrumbNameMap does not contain hidden menus. --- 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 218c706513..ac5572f948 100644 --- a/src/models/menu.js +++ b/src/models/menu.js @@ -103,8 +103,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 },