diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-10-27 15:48:51 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-02 08:16:27 -0500 |
commit | 55f137c19cf45f4fd17249b5a23650c84b0d4f23 (patch) | |
tree | 0600885dab18a45c0b39f9a382ab5d776bedbce8 /web/react/components/sidebar_right.jsx | |
parent | 65acb1b201147ee20d3a07f97073ab7cd8c0efc2 (diff) | |
download | chat-55f137c19cf45f4fd17249b5a23650c84b0d4f23.tar.gz chat-55f137c19cf45f4fd17249b5a23650c84b0d4f23.tar.bz2 chat-55f137c19cf45f4fd17249b5a23650c84b0d4f23.zip |
Creating hierarchy
Diffstat (limited to 'web/react/components/sidebar_right.jsx')
-rw-r--r-- | web/react/components/sidebar_right.jsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/web/react/components/sidebar_right.jsx b/web/react/components/sidebar_right.jsx index 51225cbbe..2ec2b5bbf 100644 --- a/web/react/components/sidebar_right.jsx +++ b/web/react/components/sidebar_right.jsx @@ -53,9 +53,13 @@ export default class SidebarRight extends React.Component { } render() { var postHolder = $('.post-list-holder-by-time').not('.inactive'); - const position = postHolder.scrollTop() + postHolder.height() + 14; - const bottom = postHolder[0].scrollHeight; - this.plScrolledToBottom = position >= bottom; + if (postHolder[0]) { + const position = postHolder.scrollTop() + postHolder.height() + 14; + const bottom = postHolder[0].scrollHeight; + this.plScrolledToBottom = position >= bottom; + } else { + this.plScrolledToBottom = true; + } if (!(this.state.search_visible || this.state.post_right_visible)) { $('.inner__wrap').removeClass('move--left').removeClass('move--right'); |