fix(desk): Ignore list view settings when not fetched

Views extending ListView inherit methods (sometimes without overriding)
For such cases check if list_view_settings property is available first
This commit is contained in:
Aditya Hase 2019-03-07 12:56:25 +05:30
parent 2776d3301d
commit 6b3d3b57dc
2 changed files with 2 additions and 2 deletions

View file

@ -258,7 +258,7 @@ frappe.views.ListSidebar = class ListSidebar {
get_stats() {
var me = this;
if (this.list_view.list_view_settings.disable_sidebar_stats) {
if (this.list_view.list_view_settings && this.list_view.list_view_settings.disable_sidebar_stats) {
return;
}
frappe.call({

View file

@ -294,7 +294,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
}
freeze() {
if (!this.list_view_settings.disable_count) {
if (this.list_view_settings && !this.list_view_settings.disable_count) {
this.$result.find('.list-count').html(`<span>${__('Refreshing')}...</span>`);
}
}