From 516768b6926bb4341e29ae9e3a6352236948df5d Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sat, 2 May 2020 13:33:21 +0200 Subject: [PATCH] iap: Allow exp to be null Not sure how this can ever happen, but it's clearly being reported in Sentry. --- lib/iap.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iap.dart b/lib/iap.dart index 716834be..b4598882 100644 --- a/lib/iap.dart +++ b/lib/iap.dart @@ -8,7 +8,7 @@ class InAppPurchases { static void confirmProPurchase() async { var currentDt = DateTime.now().toUtc().toIso8601String(); var exp = Settings.instance.proExpirationDate; - if (exp.isNotEmpty && exp.compareTo(currentDt) > 0) { + if (exp != null && exp.isNotEmpty && exp.compareTo(currentDt) > 0) { print("Not checking PurchaseInfo as exp = $exp and cur = $currentDt"); return; }