Skip to content

Commit

Permalink
Return App Store subscription options only if not nil (#3068)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1203936086921904/1207934463147478/f

**Description**:
In case no App Store subscription objects are available we should return
a proper `SubscriptionOptions.empty` object.
  • Loading branch information
miasma13 authored Aug 5, 2024
1 parent 9a32b78 commit ec4b2d8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ final class SubscriptionPagesUseSubscriptionFeature: Subfeature {
switch subscriptionPlatform {
case .appStore:
if #available(macOS 12.0, *) {
return await subscriptionManager.storePurchaseManager().subscriptionOptions()
if let subscriptionOptions = await subscriptionManager.storePurchaseManager().subscriptionOptions() {
return subscriptionOptions
}
}
case .stripe:
switch await stripePurchaseFlow.subscriptionOptions() {
Expand Down

0 comments on commit ec4b2d8

Please sign in to comment.