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