diff --git a/frappe/public/js/frappe/form/controls/color.js b/frappe/public/js/frappe/form/controls/color.js index 7890ea755c..bf04581abd 100644 --- a/frappe/public/js/frappe/form/controls/color.js +++ b/frappe/public/js/frappe/form/controls/color.js @@ -76,7 +76,7 @@ frappe.ui.form.ControlColor = frappe.ui.form.ControlData.extend({ refresh() { this._super(); let color = this.get_color(); - if (this.picker.color !== color) { + if (this.picker && this.picker.color !== color) { this.picker.color = color; this.picker.refresh(); } diff --git a/frappe/public/js/frappe/form/formatters.js b/frappe/public/js/frappe/form/formatters.js index 4578cf2ded..f792d5b173 100644 --- a/frappe/public/js/frappe/form/formatters.js +++ b/frappe/public/js/frappe/form/formatters.js @@ -293,6 +293,12 @@ frappe.form.formatters = { return frappe.format(value, link_field, options, row); }); return formatted_values.join(', '); + }, + Color: (value) => { + return `