diff --git a/index.html b/index.html
index 71fbbfc..85eb46e 100644
--- a/index.html
+++ b/index.html
@@ -170,6 +170,10 @@
});
searchForm.addEventListener('submit', function(event) {
+ event.preventDefault();
+
+ if (searchInput.value === '') return false;
+
var redirect = opts.defaultCommand + encodeURIComponent(q);
var q = searchInput.value.split(opts.delimiter);
@@ -186,7 +190,6 @@
});
window.location.href = redirect;
- event.preventDefault();
}, false);
})({
delimiter: ' ',