Fix search activation when no query is present

Closes #661, as pointed out by @birjolaxew the return value by
getUrlParameter() will not be null but an empty string (which is a falsy
value) if no query is present, checking for truthiness should work
correctly.
This commit is contained in:
Eric Cornelissen 2017-11-02 21:03:55 +01:00
parent 04d9c945cc
commit 9ed48875bf

View File

@ -653,7 +653,7 @@
document.addEventListener('DOMContentLoaded', function() {
// Load search query if present
var query = getUrlParameter(queryParameter);
if (query !== null) {
if (query) {
$search.classList.add('search--active');
$searchInput.value = query;
search(query);