File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { AccountDetailsSchema } from 'services/account/useAccountDetails'
55import { IndividualPlan } from 'services/account/useAvailablePlans'
66import { Plan , TrialStatus , TrialStatuses } from 'services/account/usePlanData'
77import {
8+ BillingRate ,
89 canApplySentryUpgrade ,
910 findProPlans ,
1011 findSentryPlans ,
@@ -234,8 +235,10 @@ export const getDefaultValuesUpgradeForm = ({
234235 } else if ( plan ?. isTeamPlan || selectedPlan ?. isTeamPlan ) {
235236 newPlan = teamPlanMonth
236237 }
237- // Fallback order: preferred monthly plan -> selectedPlan -> plan
238- newPlan = newPlan ?? selectedPlan ?? plan ?? undefined
238+ // Fallback order: preferred monthly plan -> selectedPlan if monthly -> plan if monthly -> undefined
239+ const fallbackPlan = newPlan ?? selectedPlan ?? plan ?? undefined
240+ newPlan =
241+ fallbackPlan ?. billingRate === BillingRate . MONTHLY ? fallbackPlan : undefined
239242
240243 const seats = extractSeats ( {
241244 // free seats are included in planUserCount but we want to use the paid number
You can’t perform that action at this time.
0 commit comments