Kaynağa Gözat

Fix bug on search when reloading a page and then hitting control keys when the search is empty

Jordi Boggiano 11 yıl önce
ebeveyn
işleme
ab30753ebe

+ 3 - 1
src/Packagist/WebBundle/Resources/public/js/search.js

@@ -35,7 +35,9 @@
         }
 
         if ($('#search_query_query').val().match(/^\s*$/) !== null) {
-            list.addClass('hidden');
+            if (previousQuery !== undefined) {
+                list.addClass('hidden');
+            }
             return;
         }