diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-26 08:47:58 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-26 08:47:58 -0400 |
commit | e5ec6c95b597b6c8cde82091d1e13b9e8d34c484 (patch) | |
tree | 91a20e92e7b10bc9e7714f020bbab0294de65411 /webapp/components | |
parent | 4353e1fb978b70966800049cbf62088a53ab6df4 (diff) | |
download | chat-e5ec6c95b597b6c8cde82091d1e13b9e8d34c484.tar.gz chat-e5ec6c95b597b6c8cde82091d1e13b9e8d34c484.tar.bz2 chat-e5ec6c95b597b6c8cde82091d1e13b9e8d34c484.zip |
Prevented scrolling through suggestion list when there's no suggestions (#3111)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/suggestion/suggestion_list.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/components/suggestion/suggestion_list.jsx b/webapp/components/suggestion/suggestion_list.jsx index ce950e4f4..71f767104 100644 --- a/webapp/components/suggestion/suggestion_list.jsx +++ b/webapp/components/suggestion/suggestion_list.jsx @@ -62,6 +62,10 @@ export default class SuggestionList extends React.Component { scrollToItem(term) { const content = this.getContent(); + if (!content) { + return; + } + const visibleContentHeight = content[0].clientHeight; const actualContentHeight = content[0].scrollHeight; |