fix: fix panic: `fuzzy` library doesn't like empty lists

Andrey Nering created

Change summary

internal/tui/exp/list/filterable.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

internal/tui/exp/list/filterable.go 🔗

@@ -246,7 +246,7 @@ func (f *filterableList[T]) Filter(query string) tea.Cmd {
 	}
 
 	f.selectedItem = ""
-	if query == "" {
+	if query == "" || len(f.items) == 0 {
 		return f.list.SetItems(f.items)
 	}