Remove unnecessary comparison

This commit is contained in:
Pavel Tikhonenko
2021-06-08 13:17:29 +03:00
parent a41d466d15
commit 1682b6f9eb
+5 -7
View File
@@ -234,13 +234,11 @@ public extension InAppReceipt
var lastInterval: TimeInterval = 0
for iap in filtered
{
if !(iap.productIdentifier == productIdentifier) {
continue
}
if let thisInterval = iap.subscriptionExpirationDate?.timeIntervalSince1970 {
if purchase == nil || thisInterval > lastInterval {
{
if let thisInterval = iap.subscriptionExpirationDate?.timeIntervalSince1970
{
if purchase == nil || thisInterval > lastInterval
{
purchase = iap
lastInterval = thisInterval
}