Skip to content

Commit a0f2a1d

Browse files
authored
fix: remove guards from account-billing-context (#5892)
1 parent 8a0fc0a commit a0f2a1d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/billing/components/BillingPageContents.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ const BillingPageContents: FC = () => {
3030
}
3131
}, []) // eslint-disable-line react-hooks/exhaustive-deps
3232

33-
if (account?.billingProvider === null) {
33+
if (account.billingProvider === undefined) {
34+
return null
35+
}
36+
37+
if (account.billingProvider === null) {
3438
return <BillingFree />
3539
}
3640

37-
if (account?.billingProvider !== 'zuora') {
41+
if (account.billingProvider !== 'zuora') {
3842
return <MarketplaceBilling />
3943
}
4044

41-
if (account?.type === 'pay_as_you_go') {
45+
if (account.type === 'pay_as_you_go') {
4246
return <BillingPayAsYouGo />
4347
}
4448

0 commit comments

Comments
 (0)