From 5543c126e68bd6652084cff3106731412cf757c2 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 30 Aug 2016 15:22:52 +0100 Subject: [PATCH] fix tests --- src/components/views/rooms/RoomList.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 8bde9f2ace..206bf8504e 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -337,6 +337,8 @@ module.exports = React.createClass({ // Get a collection of sticky header containers references this.stickies = document.getElementsByClassName("mx_RoomSubList_labelContainer"); + if (!this.stickies.length) return; + // Make sure there is sufficient space to do sticky headers: 120px plus all the sticky headers this.scrollAreaSufficient = (120 + (this.stickies[0].getBoundingClientRect().height * this.stickies.length)) < scrollAreaHeight;