Skip to content

Commit

Permalink
fix(createAccount): possible uncaught undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
moldy530 committed May 29, 2024
1 parent 0777b97 commit e275f5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/alchemy/src/config/actions/createAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function createAccount<TAccount extends SupportedAccountTypes>(
throw new Error("Signer not connected");
}

const cachedAccount = accounts[chain.id][type];
const cachedAccount = accounts[chain.id]?.[type];
if (cachedAccount.status !== "RECONNECTING" && cachedAccount.account) {
return cachedAccount.account;
}
Expand Down

0 comments on commit e275f5f

Please sign in to comment.