Skip to content

Commit

Permalink
fix: don't crash on cultural diversity flag (#196)
Browse files Browse the repository at this point in the history
Co-authored-by: Som Gupta <[email protected]>
  • Loading branch information
Samathingamajig and knownotunknown authored Mar 22, 2024
1 parent 0c42979 commit 5b1e451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/components/common/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const flagMap = {
Writing: 'WR',
'Quantitative Reasoning': 'QR',
'Global Cultures': 'GC',
'Cultural Diversity in the United States': 'CD',
'Cultural Diversity': 'CD',
Ethics: 'E',
'Independent Inquiry': 'II',
} as const satisfies Record<string, Flag>;
Expand All @@ -31,7 +31,7 @@ export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
style={{
backgroundColor: '#FFD600',
}}
title={Object.entries(flagMap).find(([full, short]) => short === label)![0]}
title={Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label}
>
{label}
</Text>
Expand Down

0 comments on commit 5b1e451

Please sign in to comment.