Skip to content

Commit

Permalink
https://github.com/iview/iview-admin/issues/384
Browse files Browse the repository at this point in the history
  • Loading branch information
zhigang.li committed Jan 8, 2018
1 parent 18a2467 commit 525e9a2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/store/modules/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ const app = {
return child;
}
});
let handledItem = JSON.parse(JSON.stringify(menuList[len - 1]));
handledItem.children = childrenArr;
menuList.splice(len - 1, 1, handledItem);
if (childrenArr === undefined || childrenArr.length === 0) {
menuList.splice(len - 1, 1);
} else {
let handledItem = JSON.parse(JSON.stringify(menuList[len - 1]));
handledItem.children = childrenArr;
menuList.splice(len - 1, 1, handledItem);
}
}
}
});
Expand Down

0 comments on commit 525e9a2

Please sign in to comment.