Skip to content

Commit 1b337aa

Browse files
fix: fix contact fetching error when user has no contacts
1 parent 7bdb940 commit 1b337aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/subgraphQuery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export const getValidContact = async (
2929
graphQLClient: GraphQLClient,
3030
contacts: Contact[]
3131
): Promise<Contact[]> => {
32+
if (contacts.length === 0) {
33+
return [];
34+
}
3235
try {
3336
// Contacts addresses
3437
const contactsAddresses = contacts.map((contact) => contact.address);

0 commit comments

Comments
 (0)