about summary refs log tree commit diff stats
path: root/internal/components/packages.templ
diff options
context:
space:
mode:
authorAlan Pearce2024-06-21 16:58:38 +0200
committerAlan Pearce2024-06-21 16:58:38 +0200
commitdbeddced4046cb5756af2604f5cb6734b3e7cee6 (patch)
treedcad7aa9201a6e5a8e97f3f88b7aeadb50c0c330 /internal/components/packages.templ
parent107d54a4c4a415f3581a452878cdd625f7f2634a (diff)
downloadsearchix-dbeddced4046cb5756af2604f5cb6734b3e7cee6.tar.lz
searchix-dbeddced4046cb5756af2604f5cb6734b3e7cee6.tar.zst
searchix-dbeddced4046cb5756af2604f5cb6734b3e7cee6.zip
fix: panic rendering results
Diffstat (limited to 'internal/components/packages.templ')
-rw-r--r--internal/components/packages.templ4
1 files changed, 3 insertions, 1 deletions
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) {
 		</thead>
 		<tbody>
 			for _, hit := range result.Hits {
-				@packageRow(hit.Data.(nix.Package))
+				if m := convertMatch[nix.Package](hit.Data); m != nil {
+					@packageRow(*m)
+				}
 			}
 		</tbody>
 	</table>