From 58976c3b9c75077cc5847391a32e180fd19bd3aa Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 29 Aug 2019 11:21:10 +0200 Subject: [PATCH] [Room] Fix tests --- lib/src/Room.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/Room.dart b/lib/src/Room.dart index 6de3d2e0..1db278e8 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -131,7 +131,7 @@ class Room { ChatTime lastTime = ChatTime(0); Event lastEvent = null; states.forEach((String key, RoomState state) { - if (state.time > lastTime) { + if (state.time != null && state.time > lastTime) { lastTime = state.time; lastEvent = state.timelineEvent; }