fix: percent precision when value is undefined (#37755)
Co-authored-by: Nishka Gosalia <nishkagosalia@Nishkas-MacBook-Air.local>
This commit is contained in:
parent
786059047b
commit
29e52f6deb
1 changed files with 3 additions and 1 deletions
|
|
@ -94,7 +94,9 @@ frappe.form.formatters = {
|
|||
if (value === null) {
|
||||
return "";
|
||||
}
|
||||
const valuePrecision = value.toString().split(".")[1]?.length || 0;
|
||||
|
||||
const valuePrecision = value?.toString().split(".")[1]?.length || 0;
|
||||
|
||||
const precision =
|
||||
docfield.precision ||
|
||||
cint(frappe.boot.sysdefaults && frappe.boot.sysdefaults.float_precision) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue