Skip to content

Commit

Permalink
fix: Check for missing account in AccountOverlay
Browse files Browse the repository at this point in the history
  • Loading branch information
leinelissen committed Jan 7, 2022
1 parent 553360e commit 7c875c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/screens/Accounts/components/AccountOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ function AccountOverlay({ selectedAccount }: Props): JSX.Element {
}
}, [selectedAccount, dispatch, setLoading]);

// GUARD: If there is no account data available (sometimes the data hasn't
// yet been retrieved from the back-end), don't render anything.
if (!account) {
return null;
}

return (
<RightSideOverlay data-tour="accounts-account-overlay">
{selectedAccount && (
Expand Down

0 comments on commit 7c875c3

Please sign in to comment.