Skip to content

Commit 2a41ecb

Browse files
KianNHGregBrimble
authored andcommitted
[Docs Site] Ignore head from filters in ListExamples (#22055)
1 parent ed6cbad commit 2a41ecb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/ListExamples.astro

+4-6
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ const filterValues: Record<string, string[]> = {};
4040
4141
if (filters) {
4242
for (const filter of filters) {
43-
const values = examples.flatMap((x) => {
44-
if (filter in x.data) {
45-
const value = x.data[filter];
43+
const values = examples.flatMap((entry) => {
44+
if (filter === "head") return [];
4645
47-
if (typeof value === "string") {
48-
return value;
49-
}
46+
if (filter in entry.data) {
47+
return entry.data[filter];
5048
}
5149
5250
return [];

0 commit comments

Comments
 (0)