From e5ec6c95b597b6c8cde82091d1e13b9e8d34c484 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 26 May 2016 08:47:58 -0400 Subject: Prevented scrolling through suggestion list when there's no suggestions (#3111) --- webapp/components/suggestion/suggestion_list.jsx | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3-1-g7c22