Skip to content
Snippets Groups Projects
Unverified Commit c9402e31 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix search modal when not exist

parent 75db38fa
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,9 @@ window.osuny.search = {
this.modal = document.getElementById('searchModal');
this.field = document.getElementById('searchField');
this.results = document.getElementById('searchResults');
if (this.modal === null) {
return;
}
this.modal.addEventListener('shown.bs.modal', this.open.bind(this));
this.field.addEventListener('input', this.update.bind(this));
this.request = new XMLHttpRequest();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment