fix: Show nothing for empty value instead of undefined
(cherry picked from commit 7a84a3f3ea)
This commit is contained in:
parent
4d782f9196
commit
601aeb5373
1 changed files with 3 additions and 3 deletions
|
|
@ -292,12 +292,12 @@ frappe.form.formatters = {
|
|||
return formatted_values.join(', ');
|
||||
},
|
||||
Color: (value) => {
|
||||
return `<div>
|
||||
return value ? `<div>
|
||||
<div class="selected-color" style="background-color: ${value}"></div>
|
||||
<span class="color-value">${value}</span>
|
||||
</div>`;
|
||||
</div>` : '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
frappe.form.get_formatter = function(fieldtype) {
|
||||
if(!fieldtype)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue