[Room] Fix tests

This commit is contained in:
Christian Pauly 2019-08-29 11:21:10 +02:00
parent c04a3debe4
commit 58976c3b9c

View file

@ -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;
}