fix(menu): prevent extra '/' in menu link for empty path string (#375)

This commit is contained in:
AlbertXingZhang 2016-10-27 06:28:48 -07:00 committed by Dmitry Nehaychik
parent bb4bf77ceb
commit 3f824b6e82

View file

@ -80,7 +80,7 @@ export class BaMenuService {
item.route.paths = item.route.path;
} else {
item.route.paths = parent && parent.route && parent.route.paths ? parent.route.paths.slice(0) : ['/'];
item.route.paths.push(item.route.path);
if (!!item.route.path) item.route.paths.push(item.route.path);
}
if (object.children && object.children.length > 0) {