about summary refs log tree commit diff stats
path: root/internal/components/options.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/options.templ
parent107d54a4c4a415f3581a452878cdd625f7f2634a (diff)
downloadsearchix-dbeddced4046cb5756af2604f5cb6734b3e7cee6.tar.lz
searchix-dbeddced4046cb5756af2604f5cb6734b3e7cee6.tar.zst
searchix-dbeddced4046cb5756af2604f5cb6734b3e7cee6.zip
fix: panic rendering results
Diffstat (limited to 'internal/components/options.templ')
-rw-r--r--internal/components/options.templ4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/components/options.templ b/internal/components/options.templ
index ce3ffff..44bc5a3 100644
--- a/internal/components/options.templ
+++ b/internal/components/options.templ
@@ -15,7 +15,9 @@ templ Options(result *index.Result) {
 		</thead>
 		<tbody>
 			for _, hit := range result.Hits {
-				@optionRow(hit.Data.(nix.Option))
+				if m := convertMatch[nix.Option](hit.Data); m != nil {
+					@optionRow(*m)
+				}
 			}
 		</tbody>
 	</table>