mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
fix: handle non inited searcher
This commit is contained in:
parent
38505c2a4c
commit
2c1c4aedf8
@ -287,7 +287,7 @@ export default {
|
||||
},
|
||||
open() {
|
||||
this.openModal = true;
|
||||
this.searcher.updateKeywords();
|
||||
this.searcher?.updateKeywords();
|
||||
nextTick(() => {
|
||||
this.$refs.input.focus();
|
||||
});
|
||||
@ -370,6 +370,10 @@ export default {
|
||||
}, {});
|
||||
},
|
||||
suggestions() {
|
||||
if (!this.searcher) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const suggestions = this.searcher.search(this.inputValue);
|
||||
if (this.limit === -1) {
|
||||
return suggestions;
|
||||
|
Loading…
Reference in New Issue
Block a user