Skip to content

Commit 45bd668

Browse files
committed
fix build
1 parent a165e75 commit 45bd668

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/Attendees/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import shuffle from '../../helpers/shuffle'
66
const dedupeAttendees = attendeesArray => {
77
const list = []
88
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
1213

1314
if (list.includes(cleanGhLink)) {
1415
return acc
@@ -31,7 +32,8 @@ export default ({ attendees }) => {
3132
{shuffle(dedupedAttendees).map(({ data: a }) => {
3233
// Pretty ugly but this way we do not get duplicate https://github.com urls
3334

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'
3537

3638
const ghLink = `https://github.com/${cleanGhLink.trim().replace('https://github.com/', '')}`
3739
return (

0 commit comments

Comments
 (0)