diff options
Diffstat (limited to 'frontend/static')
-rw-r--r-- | frontend/static/search.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/frontend/static/search.js b/frontend/static/search.js index edaf65f..a65e10c 100644 --- a/frontend/static/search.js +++ b/frontend/static/search.js @@ -56,8 +56,12 @@ function renderFragmentHTML(html) { pagination = fragment.querySelector("#pagination"); range.deleteContents(); range.insertNode(fragment); - addToggleEventListeners(results); - addPaginationEventListeners(pagination); + if (results !== null) { + addToggleEventListeners(results); + } + if (pagination !== null) { + addPaginationEventListeners(pagination); + } } function getResults(url) { |