summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar_right.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-10-27 15:48:51 -0400
committerChristopher Speller <crspeller@gmail.com>2015-11-02 08:16:27 -0500
commit55f137c19cf45f4fd17249b5a23650c84b0d4f23 (patch)
tree0600885dab18a45c0b39f9a382ab5d776bedbce8 /web/react/components/sidebar_right.jsx
parent65acb1b201147ee20d3a07f97073ab7cd8c0efc2 (diff)
downloadchat-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.jsx10
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');