File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import shuffle from '../../helpers/shuffle'
6
6
const dedupeAttendees = attendeesArray => {
7
7
const list = [ ]
8
8
const deduped = attendeesArray . reduce ( ( acc , current ) => {
9
- const cleanGhLink = current . data . ghLink . startsWith ( '@' )
10
- ? current . data . ghLink . slice ( 1 )
11
- : current . data . ghLink
9
+ const cleanGhLink =
10
+ current . data . ghLink && current . data . ghLink . startsWith ( '@' )
11
+ ? current . data . ghLink . slice ( 1 )
12
+ : current . data . ghLink
12
13
13
14
if ( list . includes ( cleanGhLink ) ) {
14
15
return acc
@@ -31,7 +32,8 @@ export default ({ attendees }) => {
31
32
{ shuffle ( dedupedAttendees ) . map ( ( { data : a } ) => {
32
33
// Pretty ugly but this way we do not get duplicate https://github.com urls
33
34
34
- const cleanGhLink = a . ghLink . startsWith ( '@' ) ? a . ghLink . slice ( 1 ) : a . ghLink
35
+ const cleanGhLink =
36
+ a . ghLink && a . ghLink . startsWith ( '@' ) ? a . ghLink . slice ( 1 ) : a . ghLink || 'queerjs'
35
37
36
38
const ghLink = `https://github.com/${ cleanGhLink . trim ( ) . replace ( 'https://github.com/' , '' ) } `
37
39
return (
You can’t perform that action at this time.
0 commit comments