Skip to content

Commit 9c239b0

Browse files
committed
Allow optional (nil) SKU for order line item
1 parent be477ee commit 9c239b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Networking/Networking/Model/OrderItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public struct OrderItem: Codable, Equatable, Hashable, GeneratedFakeable, Genera
9292
// some plugins alter the field value from String to Int or Decimal.
9393
let sku = container.failsafeDecodeIfPresent(targetType: String.self,
9494
forKey: .sku,
95-
alternativeTypes: [.decimal(transform: { NSDecimalNumber(decimal: $0).stringValue })]) ?? ""
95+
alternativeTypes: [.decimal(transform: { NSDecimalNumber(decimal: $0).stringValue })])
9696
let subtotal = try container.decode(String.self, forKey: .subtotal)
9797
let subtotalTax = try container.decode(String.self, forKey: .subtotalTax)
9898
let taxClass = try container.decode(String.self, forKey: .taxClass)

0 commit comments

Comments
 (0)