Skip to content

Commit

Permalink
Fix broken lens getter
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
Andrea Rosci authored and Andrea Rosci committed Dec 28, 2024
1 parent ab2330f commit cd49a6e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/AutoUI/Lenses/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ export const getLenses = <T extends object>(
return [];
}

const filteredLenses: LensTemplate[] = lenses.concat(customLenses ?? []);
const filteredLenses: LensTemplate[] = lenses
.concat(customLenses ?? [])
.filter((l) =>
Array.isArray(data)
? l.data.format !== 'summary'
: l.data.format !== 'table',
);

const slugs = filteredLenses.map((lens) => lens.slug);
if (slugs.length > uniq(slugs).length) {
Expand Down

0 comments on commit cd49a6e

Please sign in to comment.