Skip to content

Commit

Permalink
bug(Customer): prevent app crash if no data
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Mar 10, 2023
1 parent a6e4366 commit 562ef6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/customers/subscriptions/SubscriptionLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ export const SubscriptionLine = forwardRef<SubscriptionLineRef, SubscriptionLine
</Avatar>
<NameBlock>
<Typography color="textSecondary" variant="bodyHl" noWrap>
{subscriptionName || plan.name}
{subscriptionName || plan?.name}
</Typography>
<Typography variant="caption" noWrap>
{plan.code}
{plan?.code}
</Typography>
</NameBlock>
</CellBig>
Expand Down Expand Up @@ -183,7 +183,7 @@ export const SubscriptionLine = forwardRef<SubscriptionLineRef, SubscriptionLine
terminateSubscriptionDialogRef as MutableRefObject<TerminateCustomerSubscriptionDialogRef>
)?.current?.openDialog({
id: subscriptionId,
name: subscriptionName || plan.name,
name: subscriptionName || plan?.name,
})
closePopper()
}}
Expand Down

0 comments on commit 562ef6d

Please sign in to comment.