]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/entity-search.js
respective book and chapter structure added.
[bookstack] / resources / js / components / entity-search.js
index b0e42401d51b1520807cfb97d295afaf27ecd826..7a50444708dee6313ab5b2caee5a2dd21def7cdb 100644 (file)
@@ -1,7 +1,8 @@
-import {onSelect} from "../services/dom";
-import {Component} from "./component";
+import {onSelect} from '../services/dom';
+import {Component} from './component';
 
 export class EntitySearch extends Component {
+
     setup() {
         this.entityId = this.$opts.entityId;
         this.entityType = this.$opts.entityType;
@@ -30,7 +31,8 @@ export class EntitySearch extends Component {
     runSearch() {
         const term = this.searchInput.value.trim();
         if (term.length === 0) {
-            return this.clearSearch();
+            this.clearSearch();
+            return;
         }
 
         this.searchView.classList.remove('hidden');
@@ -51,4 +53,5 @@ export class EntitySearch extends Component {
         this.loadingBlock.classList.add('hidden');
         this.searchInput.value = '';
     }
-}
\ No newline at end of file
+
+}