backport fixes from vector

This commit is contained in:
David Baker 2015-09-16 13:48:24 +01:00
parent aba4c1e9af
commit 6cca5f4c05
2 changed files with 32 additions and 2 deletions

View file

@ -17,7 +17,12 @@ limitations under the License.
'use strict';
function tsOfNewestEvent(room) {
return room.timeline[room.timeline.length - 1].getTs();
if (room.timeline.length) {
return room.timeline[room.timeline.length - 1].getTs();
}
else {
return Number.MAX_SAFE_INTEGER;
}
}
function mostRecentActivityFirst(roomList) {