Skip to content

Commit

Permalink
fix: Handle potentially missing upstream story data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidnioulz committed Dec 5, 2024
1 parent 57eb959 commit 4abb9b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/useBadgesToDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export function useBadgesToDisplay({
type,
}: UseBadgesToDisplayOptions): BadgesToDisplay {
return useMemo(() => {
/* Handle potentially missing data from callees. */
if (!tags || !type) {
return []
}

return (parameters || [])
.map((config) => ({
...config,
Expand Down

0 comments on commit 4abb9b1

Please sign in to comment.