diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 4da41ac0d88e7859ab2cf743e350e5f1601e8d40..17bace81c3c86e0b1d726a344b7a4e72143e45ba 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -58,6 +58,9 @@ class BasicLayout extends React.PureComponent { getDefaultCollapsedSubMenus(props) { const currentMenuSelectedKeys = [...this.getCurrentMenuSelectedKeys(props)]; currentMenuSelectedKeys.splice(-1, 1); + if (currentMenuSelectedKeys.length === 0) { + return ['dashboard']; + } return currentMenuSelectedKeys; } getCurrentMenuSelectedKeys(props) {