fix: Code control bug

this.$expand_button
This commit is contained in:
Suraj Shetty 2020-06-06 10:48:23 +05:30
parent 74db2ef88b
commit 3c69d17ae1

View file

@ -39,7 +39,7 @@ frappe.ui.form.ControlCode = frappe.ui.form.ControlText.extend({
toggle_label() {
const button_label = this.expanded ? __('Collapse') : __('Expand');
this.$expand_button.text(button_label);
this.$expand_button && this.$expand_button.text(button_label);
},
set_language() {