Skip to content

Commit 02903d0

Browse files
Merge pull request #31 from ParsePlatform/richardross.collectchildren.crash
Fix crash related to duplicate dictionary keys.
2 parents c49673a + e2e7751 commit 02903d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Parse/ParseObject.cs

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ private IDictionary<string, ParseObject> CollectFetchedObjects() {
608608
return DeepTraversal(estimatedData)
609609
.OfType<ParseObject>()
610610
.Where(o => o.ObjectId != null && o.IsDataAvailable)
611-
.ToDictionary(pair => pair.ObjectId, pair => pair);
611+
.GroupBy(o => o.ObjectId)
612+
.ToDictionary(group => group.Key, group => group.Last());
612613
}
613614

614615
internal static IDictionary<string, object> ToJSONObjectForSaving(

0 commit comments

Comments
 (0)