Skip to content

Commit a78e828

Browse files
authored
fix(datastore): return null for list field in nested model (#843)
1 parent 5c59eb5 commit a78e828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/amplify_datastore/ios/Classes/types/model/FlutterSerializedModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ struct FlutterSerializedModel: Model, JSONValueHolder {
176176
if case .object(let deserializedValue) = value {
177177
// If a field that has many models
178178
if (deserializedValue["associatedField"] != nil && deserializedValue["associatedId"] != nil) {
179-
result[key] = Array<Any>();
179+
result[key] = nil
180180
}
181181
// If a field that has one or belongs to a model
182182
else if case .string(let modelId) = deserializedValue["id"],

0 commit comments

Comments
 (0)