mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltStoreCore] Fixes parsing Patreon responses containing tiers with null titles
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user