summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-11-01 05:35:21 -0700
committerChristopher Speller <crspeller@gmail.com>2016-11-01 08:35:21 -0400
commit9bae1f7e9308be8c7084f73e6b897dde24aad717 (patch)
treee9db1f69a81622167e9fc2b78ee582e5f16dc2fb
parent6d3b3162b031594568b045943422fcac2b2471d1 (diff)
downloadchat-9bae1f7e9308be8c7084f73e6b897dde24aad717.tar.gz
chat-9bae1f7e9308be8c7084f73e6b897dde24aad717.tar.bz2
chat-9bae1f7e9308be8c7084f73e6b897dde24aad717.zip
Fixing scrollHeight javascript error (#4388)
-rw-r--r--webapp/components/post_view/components/post_list.jsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx
index 8e1d58e15..685af045a 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;
+ }
});
}