From be5aaeaad74c552947fb2b4350e227397bb94ab9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 11 Aug 2015 17:20:31 +0100 Subject: [PATCH] Don't try to fill space if we don't have a message wrapper --- src/controllers/organisms/RoomView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js index 2629e33b..540ac119 100644 --- a/src/controllers/organisms/RoomView.js +++ b/src/controllers/organisms/RoomView.js @@ -201,8 +201,8 @@ module.exports = { }, fillSpace: function() { + if (!this.refs.messageWrapper) return; var messageWrapper = this.refs.messageWrapper.getDOMNode(); - if (!messageWrapper) return; if (messageWrapper.scrollTop < messageWrapper.clientHeight && this.state.room.oldState.paginationToken) { this.setState({paginating: true});