From fcf6b55c4306f9130896500f272c00870b55950a Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 12 Jun 2019 07:45:57 +0000 Subject: [PATCH] Update lib/src/Store.dart --- lib/src/Store.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]]);