fix: panic rendering corrupted data
1 file changed, 20 insertions(+), 1 deletion(-)
changed files
M internal/components/packages.go → internal/components/packages.go
@@ -27,8 +27,27 @@ if m := convertMatch[nix.Package](hit.Data); m != nil { return packageRow(hit, *m) } - return nil + return emptyPackageRow(hit) }), + ), + ) +} + +func emptyPackageRow(hit index.DocumentMatch) g.Node { + return Tr( + Td( + openDialogLink(hit.ID), + ), + Td( + g.Text(hit.ID), + ), + Td(Class("description"), + g.Text("No description available"), + ), + g.If(config.DevMode, + Td(Class("score"), + Score(hit), + ), ), ) }