Browse Source

hide suggestions box if empty

This bug happens only in python3
because map returns an iterator.
Marc Abonce Seguin 5 years ago
parent
commit
495ae59b31
1 changed files with 5 additions and 5 deletions
  1. 5 5
      searx/webapp.py

+ 5 - 5
searx/webapp.py

@@ -606,11 +606,11 @@ def index():
     # HTML output format
 
     # suggestions: use RawTextQuery to get the suggestion URLs with the same bang
-    suggestion_urls = map(lambda suggestion: {
-                          'url': raw_text_query.changeSearchQuery(suggestion).getFullQuery(),
-                          'title': suggestion
-                          },
-                          result_container.suggestions)
+    suggestion_urls = list(map(lambda suggestion: {
+                               'url': raw_text_query.changeSearchQuery(suggestion).getFullQuery(),
+                               'title': suggestion
+                               },
+                               result_container.suggestions))
 
     correction_urls = list(map(lambda correction: {
                                'url': raw_text_query.changeSearchQuery(correction).getFullQuery(),