2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: Fallback for getFilters

This commit is contained in:
Faris Ansari 2019-11-08 16:15:14 +05:30
parent 15e4dc6314
commit dc3b3a3836

View File

@ -46,7 +46,9 @@ export default {
},
async getFilters(keyword) {
let doc = await frappe.getDoc(this.doctype, this.name);
return this.df.getFilters ? await this.df.getFilters(keyword, doc) : {};
return this.df.getFilters
? (await this.df.getFilters(keyword, doc)) || {}
: {};
},
async openNewDoc() {
let doctype = this.df.target;