Skip to content

Commit 248ad0d

Browse files
committed
refactor: review
1 parent 53e9b72 commit 248ad0d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apps/site/next-data/generators/supportersData.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ async function fetchOpenCollectiveData() {
1919
name,
2020
image,
2121
url: website,
22-
// If profile starts with 'guest-', it's a non-existing account
23-
profile: profile.includes('guest-') ? null : profile,
22+
// If profile starts with the guest- prefix, it's a non-existing account
23+
profile: profile.startsWith('https://opencollective.com/guest-')
24+
? undefined
25+
: profile,
2426
source: 'opencollective',
2527
}));
2628

apps/site/types/supporters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export type Supporter<T extends string> = {
22
name: string;
33
image: string;
44
url: string;
5-
profile: string;
5+
profile?: string;
66
source: T;
77
};
88

0 commit comments

Comments
 (0)