summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-05-26 08:47:58 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-26 08:47:58 -0400
commite5ec6c95b597b6c8cde82091d1e13b9e8d34c484 (patch)
tree91a20e92e7b10bc9e7714f020bbab0294de65411 /webapp/components/suggestion
parent4353e1fb978b70966800049cbf62088a53ab6df4 (diff)
downloadchat-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/suggestion')
-rw-r--r--webapp/components/suggestion/suggestion_list.jsx4
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;