forked from matrix/element-web
fix NPE for invites
This commit is contained in:
parent
6b0167375c
commit
69d1844773
|
@ -17,8 +17,13 @@ limitations under the License.
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function tsOfNewestEvent(room) {
|
function tsOfNewestEvent(room) {
|
||||||
|
if (room.timeline.length) {
|
||||||
return room.timeline[room.timeline.length - 1].getTs();
|
return room.timeline[room.timeline.length - 1].getTs();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return Number.MAX_SAFE_INTEGER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function mostRecentActivityFirst(roomList) {
|
function mostRecentActivityFirst(roomList) {
|
||||||
return roomList.sort(function(a,b) {
|
return roomList.sort(function(a,b) {
|
||||||
|
|
Loading…
Reference in New Issue