Commit ebde3e57 authored by valleykid's avatar valleykid Committed by 偏右

Fixed bug#140 (#164)

parent 60c34b61
......@@ -206,7 +206,7 @@ class BasicLayout extends React.PureComponent {
handleOpenChange = (openKeys) => {
const lastOpenKey = openKeys[openKeys.length - 1];
const isMainMenu = this.menus.some(
item => (item.key === lastOpenKey || item.path === lastOpenKey)
item => lastOpenKey && (item.key === lastOpenKey || item.path === lastOpenKey)
);
this.setState({
openKeys: isMainMenu ? [lastOpenKey] : [...openKeys],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment