Skip to content

Commit b6cca6f

Browse files
committed
Update left-nav.jsx
Menu can be null if the MenuItems are inlined
1 parent 789eaee commit b6cca6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/left-nav.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,10 @@ const LeftNav = React.createClass({
225225
if (this.props.header) {
226226
let container = ReactDOM.findDOMNode(this.refs.clickAwayableElement);
227227
let menu = ReactDOM.findDOMNode(this.refs.menuItems);
228-
let menuHeight = container.clientHeight - menu.offsetTop;
229-
menu.style.height = menuHeight + 'px';
228+
if (menu){
229+
let menuHeight = container.clientHeight - menu.offsetTop;
230+
menu.style.height = menuHeight + 'px';
231+
}
230232
}
231233
},
232234

0 commit comments

Comments
 (0)