Fix map being called on null delta rooms

Fixes PATTLE-B.
parent 26b57a4c
......@@ -134,7 +134,7 @@ class Matrix {
chats: _chats,
// TODO: Add toMap in SDK
delta: Map.fromEntries(
update.delta.rooms.map((room) => MapEntry(room.id, room)),
update.delta.rooms?.map((room) => MapEntry(room.id, room)) ?? [],
),
type: update is RequestUpdate ? update.type : null,
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment