mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
fix(scroll): don't scroll to region if node doesn't exist
This commit is contained in:
parent
99da4a112a
commit
2370c7cdc1
1 changed files with 1 additions and 0 deletions
|
@ -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: =>
|
||||||
|
|
Loading…
Reference in a new issue