[AltStoreCore] Fixes parsing Patreon responses containing tiers with null titles

This commit is contained in:
Riley Testut
2024-01-08 14:23:19 -06:00
committed by Magesh K
parent 90fbb28b54
commit becc626027
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ public class PledgeTier: NSManagedObject, Fetchable
{
super.init(entity: PledgeTier.entity(), insertInto: context)
self.name = tier.name
self.name = tier.name ?? ""
self.identifier = tier.identifier
self._amount = tier.amount as NSDecimalNumber
}

View File

@@ -14,7 +14,7 @@ extension PatreonAPI
struct TierAttributes: Decodable
{
var title: String
var title: String?
var amount_cents: Int32 // In USD
}
@@ -28,7 +28,7 @@ extension PatreonAPI
{
public struct Tier: Hashable
{
public var name: String
public var name: String?
public var identifier: String
public var amount: Decimal