From 5a2d54d9c8751935284293b2ffd396fff0a5d202 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 11 Jul 2024 22:33:50 +0200 Subject: fix: panic rendering search results --- internal/components/results.templ | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/components/results.templ b/internal/components/results.templ index b051219..6d85e16 100644 --- a/internal/components/results.templ +++ b/internal/components/results.templ @@ -6,7 +6,10 @@ import ( ) func convertMatch[I nix.Importable](m nix.Importable) *I { - i := m.(I) + i, ok := m.(I) + if !ok { + return nil + } return &i } -- cgit 1.4.1