Update StoreApp.swift

Signed-off-by: Rose <cool5tarXV@gmail.com>
This commit is contained in:
Rose
2024-12-23 16:20:03 +08:00
committed by June Park
parent 3db004c733
commit 09902a3f71

View File

@@ -290,7 +290,7 @@ public class StoreApp: NSManagedObject, Decodable, Fetchable
if let versions = try container.decodeIfPresent([AppVersion].self, forKey: .versions)
{
//TODO: Throw error if there isn't at least one version.
if (versions.size == 0){
if (versions.count == 0){
throw DecodingError.dataCorruptedError(forKey: .versions, in: container, debugDescription: "At least one version is required in key: versions")
}