From 9ed48875bf94a67ef6196c3e66915a4e9e314460 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Thu, 2 Nov 2017 21:03:55 +0100 Subject: [PATCH] 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. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 73aaadb3..4e2ceecc 100644 --- a/index.html +++ b/index.html @@ -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);