iap: Allow exp to be null

Not sure how this can ever happen, but it's clearly being reported in
Sentry.
This commit is contained in:
Vishesh Handa
2020-05-02 13:33:21 +02:00
parent e8343f1804
commit 516768b692

View File

@ -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;
}