decodeArray return empty array
This commit is contained in:
parent
3842858443
commit
d7a7425bb3
@ -105,7 +105,7 @@ extension KeyedDecodingContainer where Key: CodingKey {
|
||||
|
||||
public func decodeArray<C:CodingKey>(codingKey: KeyedDecodingContainer<K>.Key, typeCodingKey: C) throws -> [Model] {
|
||||
guard let models: [Model] = try decodeArrayIfPresent(codingKey: codingKey, typeCodingKey: typeCodingKey) else {
|
||||
throw ModelRegistry.Error.decoderErrorObjectNotPresent
|
||||
return [Model]()
|
||||
}
|
||||
return models
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user