File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -244,10 +244,10 @@ async function fetchGitHubSponsors(): Promise<Sponsor[]> {
244
244
}
245
245
246
246
async function fetchSponsors ( ) : Promise < Sponsor [ ] > {
247
- const openCollectiveSponsors = fetchOpenCollectiveSponsors ( ) ;
248
- const githubSponsors = fetchGitHubSponsors ( ) ;
249
-
250
- return [ ... ( await openCollectiveSponsors ) , ... ( await githubSponsors ) ] ;
247
+ return Promise . all ( [
248
+ fetchOpenCollectiveSponsors ( ) ,
249
+ fetchGitHubSponsors ( ) ,
250
+ ] ) . then ( ( results ) => results . flat ( ) ) ;
251
251
}
252
252
253
253
/*
@@ -270,6 +270,8 @@ const professionalToBackerOverrides = new Map([
270
270
271
271
const sponsors = await fetchSponsors ( ) ;
272
272
273
+ console . log ( 'Received sponsors:' , sponsors ) ;
274
+
273
275
// Remove sponsors that are already in the pre-populated headliners
274
276
for ( let i = 0 ; i < sponsors . length ; i ++ ) {
275
277
if (
@@ -309,7 +311,7 @@ for (const tier of Object.values(tierSponsors)) {
309
311
// Sort order based on total donations
310
312
tier . sort ( ( a : Sponsor , b : Sponsor ) => b . totalDonations - a . totalDonations ) ;
311
313
312
- // Set all montly donations to 0
314
+ // Set all donations to 0 before writing to JSON
313
315
for ( const sponsor of tier ) {
314
316
sponsor . monthlyDonation = 0 ;
315
317
sponsor . totalDonations = 0 ;
You can’t perform that action at this time.
0 commit comments