Skip to content

Commit

Permalink
remove null artists who are unpublished on a published show (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
antiantivirus authored Nov 7, 2024
1 parent e2632c0 commit a734287
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export const sortAndGroup = (data: AllArtistEntry[]): GroupedArtists[] => {
};

export const formatArtistNames = (data: ArtistInterface[]) => {
const names = data.map(({ name }) => name);
// remove null artists who are unpublished on a published show
const filteredData = data.filter((artist) => artist !== null);
const names = filteredData.map(({ name }) => name);

if (names.length === 1) {
return `with ${names[0]}`;
Expand Down

0 comments on commit a734287

Please sign in to comment.