fix: panic rendering search results
Alan Pearce alan@alanpearce.eu
Thu, 11 Jul 2024 22:33:50 +0200
1 files changed, 4 insertions(+), 1 deletions(-)
M internal/components/results.templ → internal/components/results.templ
@@ -6,7 +6,10 @@ "go.alanpearce.eu/searchix/internal/nix" ) func convertMatch[I nix.Importable](m nix.Importable) *I { - i := m.(I) + i, ok := m.(I) + if !ok { + return nil + } return &i }