]> git.lizzy.rs Git - go-anidb.git/blobdiff - titles.go
anidb: Correct cache key for LID.MyListEntry
[go-anidb.git] / titles.go
index 19f56a172a0dc070a7659718980178a1be3adc69..da36e313075b58af5318cbec2d099f85fe912a91 100644 (file)
--- a/titles.go
+++ b/titles.go
@@ -17,6 +17,9 @@ func SearchAnime(name string) AID {
 
 // Searches for all anime that match the given anime name, case sensitive.
 func SearchAnimeAll(name string) titles.ResultSet {
+       if name == "" {
+               return nil
+       }
        return titlesDB.FuzzySearch(name)
 }
 
@@ -33,5 +36,8 @@ func SearchAnimeFold(name string) AID {
 
 // Searches for all anime that match the given anime name, case folding.
 func SearchAnimeFoldAll(name string) titles.ResultSet {
+       if name == "" {
+               return nil
+       }
        return titlesDB.FuzzySearchFold(name)
 }