diff --git a/packages/desktop-client/src/components/modals/CreateAccount.tsx b/packages/desktop-client/src/components/modals/CreateAccount.tsx index cef5940f0b9..757fe8c7054 100644 --- a/packages/desktop-client/src/components/modals/CreateAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccount.tsx @@ -39,7 +39,7 @@ export function CreateAccount({ return; } - if (upgradingAccountId === undefined) { + if (upgradingAccountId == null) { authorizeBank(actions.pushModal); } else { authorizeBank(actions.pushModal, { @@ -71,9 +71,7 @@ export function CreateAccount({ orgDomain: string; }; - for (let i = 0; i < results.accounts.length; i++) { - const oldAccount = results.accounts[i]; - + for (const oldAccount of results.accounts) { const newAccount: NormalizedAccount = { account_id: oldAccount.id, name: oldAccount.name, @@ -122,7 +120,7 @@ export function CreateAccount({ const [loadingSimpleFinAccounts, setLoadingSimpleFinAccounts] = useState(false); - if (upgradingAccountId !== undefined) { + if (upgradingAccountId != null) { title = 'Link Account'; } @@ -130,7 +128,7 @@ export function CreateAccount({ {() => ( - {upgradingAccountId === undefined && ( + {upgradingAccountId == null && (