From d7a7425bb358d47cb726f55663e18479448216a2 Mon Sep 17 00:00:00 2001 From: panxi Date: Fri, 13 Dec 2019 11:04:32 -0500 Subject: [PATCH] decodeArray return empty array --- MVMCore/MVMCore/Models/Model/ModelRegistry.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/Models/Model/ModelRegistry.swift b/MVMCore/MVMCore/Models/Model/ModelRegistry.swift index f097004..75436fc 100644 --- a/MVMCore/MVMCore/Models/Model/ModelRegistry.swift +++ b/MVMCore/MVMCore/Models/Model/ModelRegistry.swift @@ -105,7 +105,7 @@ extension KeyedDecodingContainer where Key: CodingKey { public func decodeArray(codingKey: KeyedDecodingContainer.Key, typeCodingKey: C) throws -> [Model] { guard let models: [Model] = try decodeArrayIfPresent(codingKey: codingKey, typeCodingKey: typeCodingKey) else { - throw ModelRegistry.Error.decoderErrorObjectNotPresent + return [Model]() } return models }