fix(scroll): don't scroll to region if node doesn't exist

This commit is contained in:
Evan Morikawa 2015-08-03 10:41:11 -07:00
parent 99da4a112a
commit 2370c7cdc1

View file

@ -57,6 +57,7 @@ class MultiselectList extends React.Component
item = React.findDOMNode(@).querySelector(".focused") item = React.findDOMNode(@).querySelector(".focused")
item ?= React.findDOMNode(@).querySelector(".keyboard-cursor") item ?= React.findDOMNode(@).querySelector(".keyboard-cursor")
return unless item
@refs.list.scrollTo(item) @refs.list.scrollTo(item)
componentWillUnmount: => componentWillUnmount: =>