diff --git a/lib/Autocomplete.js b/lib/Autocomplete.js index 202389d8..a1a61736 100644 --- a/lib/Autocomplete.js +++ b/lib/Autocomplete.js @@ -246,11 +246,13 @@ class Autocomplete extends React.Component { if (this.isOpen() && this.state.highlightedIndex !== null) { const itemNode = this.refs[`item-${this.state.highlightedIndex}`] const menuNode = this.refs.menu - scrollIntoView( - findDOMNode(itemNode), - findDOMNode(menuNode), - { onlyScrollIfNeeded: true } - ) + if (itemNode) { + scrollIntoView( + findDOMNode(itemNode), + findDOMNode(menuNode), + { onlyScrollIfNeeded: true } + ) + } } }