From d563bf11527698bef02fc4b17852e260ba43f4e8 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Thu, 25 Feb 2016 19:02:30 -0500
Subject: Update search results profiles properly on refresh and handle
 scrollHeight error

---
 web/react/components/posts_view.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/components/posts_view.jsx')

diff --git a/web/react/components/posts_view.jsx b/web/react/components/posts_view.jsx
index 1ea7711ea..9a1673483 100644
--- a/web/react/components/posts_view.jsx
+++ b/web/react/components/posts_view.jsx
@@ -321,7 +321,7 @@ export default class PostsView extends React.Component {
                 if (this.refs.newMessageSeparator) {
                     var objDiv = this.refs.postlist;
                     objDiv.scrollTop = this.refs.newMessageSeparator.offsetTop; //scrolls node to top of Div
-                } else {
+                } else if (this.refs.postlist) {
                     this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight;
                 }
             });
-- 
cgit v1.2.3-1-g7c22

