Skip to content

Commit

Permalink
Add null checks around introductory price
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed Apr 2, 2018
1 parent 705c94f commit 619e93b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Plugin.InAppBilling.iOS/InAppBillingImplementation.cs
Expand Up @@ -66,8 +66,8 @@ public async override Task<IEnumerable<InAppBillingProduct>> GetProductInfoAsync
ProductId = p.ProductIdentifier,
Description = p.LocalizedDescription,
CurrencyCode = p.PriceLocale?.CurrencyCode ?? string.Empty,
LocalizedIntroductoryPrice = IsiOS112 ? p.IntroductoryPrice.LocalizedPrice() : string.Empty,
MicrosIntroductoryPrice = IsiOS112 ? (long)(p.IntroductoryPrice.Price.DoubleValue * 1000000d) : 0
LocalizedIntroductoryPrice = IsiOS112 ? (p.IntroductoryPrice?.LocalizedPrice() ?? string.Empty) : string.Empty,
MicrosIntroductoryPrice = IsiOS112 ? (long)((p.IntroductoryPrice?.Price?.DoubleValue ?? 0) * 1000000d) : 0
});
}

Expand Down

0 comments on commit 619e93b

Please sign in to comment.