Skip to content

Commit

Permalink
修复菜单管理新增目录/按钮路由url为null时,报错bug
Browse files Browse the repository at this point in the history
  • Loading branch information
daxiongYang committed May 24, 2018
1 parent ea54f26 commit 2166c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].list && menuList[i].list.length >= 1) {
temp = temp.concat(menuList[i].list)
} else if (/\S/.test(menuList[i].url)) {
} else if (menuList[i].url && /\S/.test(menuList[i].url)) {
menuList[i].url = menuList[i].url.replace(/^\//, '')
var route = {
path: menuList[i].url.replace('/', '-'),
Expand Down

0 comments on commit 2166c5e

Please sign in to comment.