Skip to content

Commit

Permalink
hotfix:修复空模块渲染页面报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongxia committed Aug 11, 2019
1 parent 3a89cd8 commit 7cd2285
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/system/$group/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ const gerneratorAmisConfig = (initData: IAppConfig) => {
const data = cloneDeep(initData);
let body: any[] = [];

// 不存在模块则直接返回
if (!data.modules || data.modules.length === 0) {
return body;
}

// 过滤掉交互弹出的组件, 比如弹窗,侧边栏
// 这里只展示打开页面展示的组件
data.modules = data.modules.filter(item => item.layout === '');
Expand Down

0 comments on commit 7cd2285

Please sign in to comment.