Skip to content

Commit

Permalink
refactor(multichain): use ternary in getMaybeSelectedInternalAccount
Browse files Browse the repository at this point in the history
Co-authored-by: Gustavo Antunes <[email protected]>
  • Loading branch information
ccharly and gantunesr authored Jun 13, 2024
1 parent 9023b7d commit 11cd32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/selectors/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export function getMaybeSelectedInternalAccount(state) {
// Same as `getSelectedInternalAccount`, but might potentially be `undefined`:
// - This might happen during the onboarding
const accountId = state.metamask.internalAccounts?.selectedAccount;
return accountId && state.metamask.internalAccounts?.accounts[accountId];
return accountId ? state.metamask.internalAccounts?.accounts[accountId] : undefined;
}

export function getSelectedInternalAccount(state) {
Expand Down

0 comments on commit 11cd32c

Please sign in to comment.