Skip to content

Commit

Permalink
fix [TypeError: Cannot read property 'account' of undefined]
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Dec 19, 2024
1 parent bd9c3f3 commit c1beff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useAccountENSDomains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const STALE_TIME = 10000;

async function fetchAccountENSDomains({ accountAddress }: { accountAddress: string }) {
const result = await fetchAccountDomains(accountAddress);
if (!result.account) return [];
if (!result?.account) return [];

const { domains: controlledDomains, registrations } = result.account;
const registarDomains = registrations?.map(({ domain }) => domain);
Expand Down

0 comments on commit c1beff8

Please sign in to comment.