diff --git a/lib/src/Store.dart b/lib/src/Store.dart index 9b3d1d0..6cb9382 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -186,10 +186,10 @@ class Store { print("New direct update: type: ${userUpdate.content["content"].runtimeType}"); if (userUpdate.content["content"] is Map) { print("Is a Map of String to List of Strings"); - Map> directMap = userUpdate.content["content"]; - directMap.forEach((String key, List value) { + final Map directMap = userUpdate.content["content"]; + directMap.forEach((String key, dynamic value) { print("Key $key, Value: $value"); - if (value.length > 0) + if (value is List && value.length > 0) txn.rawUpdate( "UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?", [key, value[0]]);