From 9bae1f7e9308be8c7084f73e6b897dde24aad717 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Tue, 1 Nov 2016 05:35:21 -0700 Subject: [PATCH] Fixing scrollHeight javascript error (#4388) --- webapp/components/post_view/components/post_list.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx index 8e1d58e159f97..685af045a28a6 100644 --- a/webapp/components/post_view/components/post_list.jsx +++ b/webapp/components/post_view/components/post_list.jsx @@ -443,7 +443,9 @@ export default class PostList extends React.Component { scrollToBottom() { this.animationFrameId = window.requestAnimationFrame(() => { - this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; + if (this.refs.postlist) { + this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; + } }); }