fix(QueryReport): Better check for route_options (#7756)

fix(QueryReport): Better check for route_options
This commit is contained in:
Aditya Hase 2019-06-24 15:51:29 +05:30 committed by GitHub
commit 9b76434047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -183,6 +183,9 @@ frappe.set_re_route = function() {
frappe.re_route[tmp] = window.location.hash;
};
frappe.has_route_options = function() {
return Boolean(Object.keys(frappe.route_options || {}).length);
}
frappe._cur_route = null;

View file

@ -99,7 +99,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
// different report
this.load_report();
}
else if (frappe.route_options){
else if (frappe.has_route_options()) {
// filters passed through routes
// so refresh report again
this.refresh_report();