Skip to content

Commit 2845193

Browse files
committed
update
1 parent cd7ae2a commit 2845193

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/providers/opencollective.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,8 @@ export async function fetchOpenCollectiveSponsors(
9494
'Content-Type': 'application/json',
9595
},
9696
}) as any
97-
if (data.errors?.length)
98-
throw new Error(`OpenCollective API error:\n${JSON.stringify(data.errors, null, 2)}`)
99-
100-
const transactions = data.data?.account?.transactions
101-
if (!transactions)
102-
throw new Error('Invalid OpenCollective response: `account.transactions` is missing')
103-
104-
const nodes = transactions.nodes
105-
const totalCount = transactions.totalCount
97+
const nodes = data.data.account.transactions.nodes
98+
const totalCount = data.data.account.transactions.totalCount
10699

107100
monthlyTransactions.push(...(nodes || []))
108101
if ((nodes.length) !== 0) {

0 commit comments

Comments
 (0)