diff options
author | Corey Hulen <corey@hulen.com> | 2016-11-01 05:35:21 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-11-01 08:35:21 -0400 |
commit | 9bae1f7e9308be8c7084f73e6b897dde24aad717 (patch) | |
tree | e9db1f69a81622167e9fc2b78ee582e5f16dc2fb /webapp/components | |
parent | 6d3b3162b031594568b045943422fcac2b2471d1 (diff) | |
download | chat-9bae1f7e9308be8c7084f73e6b897dde24aad717.tar.gz chat-9bae1f7e9308be8c7084f73e6b897dde24aad717.tar.bz2 chat-9bae1f7e9308be8c7084f73e6b897dde24aad717.zip |
Fixing scrollHeight javascript error (#4388)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/post_view/components/post_list.jsx | 4 |
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; + } }); } |