File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ async function getBackers() {
46
46
47
47
const backersToDisplay = selectRandom ( validBackers )
48
48
49
- return backersToDisplay . map ( function ( backer ) {
49
+ return backersToDisplay . reduce ( function ( results , backer ) {
50
+ if ( ! backer . sponsor ) {
51
+ return results ;
52
+ }
53
+
50
54
const {
51
55
name,
52
56
openCollectiveHandle,
@@ -68,14 +72,16 @@ async function getBackers() {
68
72
69
73
let usersName = name || githubHandle || twitterHandle || openCollectiveHandle || '' ;
70
74
71
- return {
75
+ results . push ( {
72
76
key : href ,
73
77
src : avatarUrl ,
74
78
alt : usersName ,
75
79
title : monthlyAmount ? `Thank you ${ usersName } for the $${ monthlyAmount } /month!` : `Thank you ${ usersName } for the support!` ,
76
80
href : href ,
77
- } ;
78
- } ) ;
81
+ } ) ;
82
+
83
+ return results ;
84
+ } , [ ] ) ;
79
85
}
80
86
81
87
function Backer ( { backer } ) {
You can’t perform that action at this time.
0 commit comments