diff --git a/src/useBadgesToDisplay.ts b/src/useBadgesToDisplay.ts index da5eb39..19724a5 100644 --- a/src/useBadgesToDisplay.ts +++ b/src/useBadgesToDisplay.ts @@ -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,