aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-15 23:24:51 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-15 23:24:51 +0200
commit0f58a77354cb01812c72c3e9e3a7203309825beb (patch)
treed4b34c2c8bce657a6f61de35367c58a03838360c /assets
parent738275827089308b92de2d0663ee466f78ddce08 (diff)
404 Page redesign
Diffstat (limited to 'assets')
-rw-r--r--assets/search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/assets/search.js b/assets/search.js
index 0393d2c..1feb701 100644
--- a/assets/search.js
+++ b/assets/search.js
@@ -7,6 +7,10 @@
const input = document.querySelector('#book-search-input');
const results = document.querySelector('#book-search-results');
+ if (!input) {
+ return
+ }
+
input.addEventListener('focus', init);
input.addEventListener('keyup', search);