Skip to content

Commit

Permalink
Fixing scrollHeight javascript error (#4388)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyhulen authored and crspeller committed Nov 1, 2016
1 parent 6d3b316 commit 9bae1f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/components/post_view/components/post_list.jsx
Expand Up @@ -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;
}
});
}

Expand Down

0 comments on commit 9bae1f7

Please sign in to comment.