about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2024-07-11 22:33:50 +0200
committerAlan Pearce2024-07-11 22:33:50 +0200
commit5a2d54d9c8751935284293b2ffd396fff0a5d202 (patch)
treed98ed0e76ca81d989c70a719f0cf22f778a41626 /internal
parent94b21b286edff37496a2fe481963625ac01c30a1 (diff)
downloadsearchix-5a2d54d9c8751935284293b2ffd396fff0a5d202.tar.lz
searchix-5a2d54d9c8751935284293b2ffd396fff0a5d202.tar.zst
searchix-5a2d54d9c8751935284293b2ffd396fff0a5d202.zip
fix: panic rendering search results
Diffstat (limited to 'internal')
-rw-r--r--internal/components/results.templ5
1 files changed, 4 insertions, 1 deletions
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
 }