From 964f8c1f364058e5b3f76be8ceca8d833d1d6f12 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 3 Sep 2019 14:58:11 +0000 Subject: [PATCH] [Room] Add null checker. --- 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 7d395e2..b333f23 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -70,7 +70,7 @@ class Room { Map roomAccountData = {}; /// ID of the fully read marker event. - String get fullyRead => roomAccountData["m.fully_read"].content["event_id"]; + String get fullyRead => roomAccountData["m.fully_read"] != null ? roomAccountData["m.fully_read"].content["event_id"] : ""; /// If something changes, this callback will be triggered. onRoomUpdate onUpdate;