fix: ignore undefined fields on new doctype form

This commit is contained in:
Ankush Menat 2023-06-19 18:07:23 +05:30
parent 0e92fc9bf5
commit 276b11d331

View file

@ -836,9 +836,9 @@ $.extend(frappe.model, {
}
if (
(frm.doc.fields.find((i) => i.fieldname === "latitude") &&
frm.doc.fields.find((i) => i.fieldname === "longitude")) ||
frm.doc.fields.find(
(frm.doc.fields?.find((i) => i.fieldname === "latitude") &&
frm.doc.fields?.find((i) => i.fieldname === "longitude")) ||
frm.doc.fields?.find(
(i) => i.fieldname === "location" && i.fieldtype == "Geolocation"
)
) {