feat: check if indicator is present

This commit is contained in:
Shivam Mishra 2020-09-04 12:57:15 +05:30
parent ba7eda1c63
commit e09b1cd81d

View file

@ -643,8 +643,8 @@ frappe.ui.form.Section = Class.extend({
this.body.toggleClass("hide", hide);
this.head.toggleClass("collapsed", hide);
this.indicator.toggleClass("octicon-chevron-down", hide);
this.indicator.toggleClass("octicon-chevron-up", !hide);
this.indicator && this.indicator.toggleClass("octicon-chevron-down", hide);
this.indicator && this.indicator.toggleClass("octicon-chevron-up", !hide);
// refresh signature fields
this.fields_list.forEach((f) => {