Skip to content

Commit

Permalink
Update left-nav.jsx
Browse files Browse the repository at this point in the history
Menu can be null if the MenuItems are inlined
  • Loading branch information
pinturic committed Nov 5, 2015
1 parent 789eaee commit b6cca6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,10 @@ const LeftNav = React.createClass({
if (this.props.header) {
let container = ReactDOM.findDOMNode(this.refs.clickAwayableElement);
let menu = ReactDOM.findDOMNode(this.refs.menuItems);
let menuHeight = container.clientHeight - menu.offsetTop;
menu.style.height = menuHeight + 'px';
if (menu){
let menuHeight = container.clientHeight - menu.offsetTop;
menu.style.height = menuHeight + 'px';
}
}
},

Expand Down

0 comments on commit b6cca6f

Please sign in to comment.