backport fixes from vector
This commit is contained in:
parent
aba4c1e9af
commit
6cca5f4c05
2 changed files with 32 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue