diff options
author | Alan Pearce | 2024-07-11 22:33:50 +0200 |
---|---|---|
committer | Alan Pearce | 2024-07-11 22:33:50 +0200 |
commit | 5a2d54d9c8751935284293b2ffd396fff0a5d202 (patch) | |
tree | d98ed0e76ca81d989c70a719f0cf22f778a41626 /internal | |
parent | 94b21b286edff37496a2fe481963625ac01c30a1 (diff) | |
download | searchix-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.templ | 5 |
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 } |