From 05821b0fdfad8e536294175bb551ef407508769f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 27 Aug 2020 12:42:38 +0200 Subject: [PATCH] use same check for timestamp validity as timestamp can be undefined sometimes --- src/domain/session/roomlist/RoomTileViewModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/session/roomlist/RoomTileViewModel.js b/src/domain/session/roomlist/RoomTileViewModel.js index bed129e2..e586bbd1 100644 --- a/src/domain/session/roomlist/RoomTileViewModel.js +++ b/src/domain/session/roomlist/RoomTileViewModel.js @@ -87,7 +87,7 @@ export class RoomTileViewModel extends ViewModel { // if either does not have a timestamp, put the one with a timestamp first if (myTimestampValid !== theirTimestampValid) { log("checking if either does not have lastMessageTimestamp ...", myTimestamp, theirTimestamp); - if (theirTimestamp === null) { + if (!theirTimestampValid) { return logResult(-1); } return logResult(1);