From dbeddced4046cb5756af2604f5cb6734b3e7cee6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 21 Jun 2024 16:58:38 +0200 Subject: fix: panic rendering results --- internal/components/packages.templ | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/components/packages.templ') diff --git a/internal/components/packages.templ b/internal/components/packages.templ index 4e00a5a..e811220 100644 --- a/internal/components/packages.templ +++ b/internal/components/packages.templ @@ -16,7 +16,9 @@ templ Packages(result *index.Result) { for _, hit := range result.Hits { - @packageRow(hit.Data.(nix.Package)) + if m := convertMatch[nix.Package](hit.Data); m != nil { + @packageRow(*m) + } } -- cgit 1.4.1