Skip to content

Commit 0e6303d

Browse files
authored
[Docs Site] Ignore head from filters in ListExamples (#22055)
1 parent 12a8463 commit 0e6303d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/ListExamples.astro

Lines changed: 4 additions & 6 deletions
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)