From 0f58a77354cb01812c72c3e9e3a7203309825beb Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Wed, 15 Apr 2020 23:24:51 +0200 Subject: 404 Page redesign --- assets/search.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'assets/search.js') 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); -- cgit v1.2.3