Skip to content

Commit 402dbf9

Browse files
committed
Filter to find fist SideBarGroup
1 parent 49181b3 commit 402dbf9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/PanelMenuWrapper.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ class PanelsWithSidebar extends Component {
88
super(props);
99

1010
const opts = this.computeMenuOptions(props);
11+
const firstSidebarGroup = opts.filter(o => o.panels)[0];
1112

1213
this.state = {
13-
group: opts[1].name,
14-
panel: opts[1].panels[0],
14+
group: firstSidebarGroup.name,
15+
panel: firstSidebarGroup.panels[0],
1516
};
1617

1718
this.setPanel = this.setPanel.bind(this);

0 commit comments

Comments
 (0)