From eba811147c5d0ead6704269e4015e03d0b6d4815 Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Tue, 29 Apr 2025 15:17:58 +0100 Subject: [PATCH] [Docs Site] Ignore head from filters in ListExamples --- src/components/ListExamples.astro | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ListExamples.astro b/src/components/ListExamples.astro index 325460b95f9a186..238f263931a95f9 100644 --- a/src/components/ListExamples.astro +++ b/src/components/ListExamples.astro @@ -40,13 +40,11 @@ const filterValues: Record = {}; if (filters) { for (const filter of filters) { - const values = examples.flatMap((x) => { - if (filter in x.data) { - const value = x.data[filter]; + const values = examples.flatMap((entry) => { + if (filter === "head") return []; - if (typeof value === "string") { - return value; - } + if (filter in entry.data) { + return entry.data[filter]; } return [];