Fixed editor JavaScript error in TemplateManager
- Caused when loading the editor with no templates in the system. - Tried to init a search box that did not exist.
This commit is contained in:
parent
c1fe068ffc
commit
ef416d3e86
1 changed files with 5 additions and 1 deletions
|
@ -56,6 +56,10 @@ class TemplateManager {
|
|||
|
||||
setupSearchBox() {
|
||||
const searchBox = this.elem.querySelector('.search-box');
|
||||
|
||||
// Search box may not exist if there are no existing templates in the system.
|
||||
if (!searchBox) return;
|
||||
|
||||
const input = searchBox.querySelector('input');
|
||||
const submitButton = searchBox.querySelector('button');
|
||||
const cancelButton = searchBox.querySelector('button.search-box-cancel');
|
||||
|
|
Loading…
Reference in a new issue