Commit 4ec8eb9a authored by Clement Ho's avatar Clement Ho

Fix javascript error for when there are no issues

parent 1bfdad5c
...@@ -3,9 +3,11 @@ ...@@ -3,9 +3,11 @@
(() => { (() => {
class FilteredSearchManager { class FilteredSearchManager {
constructor() { constructor() {
this.tokenizer = gl.FilteredSearchTokenizer;
this.filteredSearchInput = document.querySelector('.filtered-search'); this.filteredSearchInput = document.querySelector('.filtered-search');
this.clearSearchButton = document.querySelector('.clear-search'); this.clearSearchButton = document.querySelector('.clear-search');
if (this.filteredSearchInput) {
this.tokenizer = gl.FilteredSearchTokenizer;
this.dropdownManager = new gl.FilteredSearchDropdownManager(); this.dropdownManager = new gl.FilteredSearchDropdownManager();
this.bindEvents(); this.bindEvents();
...@@ -15,6 +17,7 @@ ...@@ -15,6 +17,7 @@
this.cleanupWrapper = this.cleanup.bind(this); this.cleanupWrapper = this.cleanup.bind(this);
document.addEventListener('page:fetch', this.cleanupWrapper); document.addEventListener('page:fetch', this.cleanupWrapper);
} }
}
cleanup() { cleanup() {
this.unbindEvents(); this.unbindEvents();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment