commit | 20fa3da950f3834cac812c9702284c470fb19af2 | [log] [tgz] |
---|---|---|
author | Gursheen Anand <gursheen@frappe.io> | Tue Feb 27 11:18:58 2024 +0530 |
committer | Gursheen Anand <gursheen@frappe.io> | Tue Feb 27 11:18:58 2024 +0530 |
tree | c3e291d9c2b9e8feb46fd392800fe7918851ce8b | |
parent | bc9c48024632198f726bd78fa6368ea9d0c26dce [diff] |
fix: type error for missing frm obj
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index aee761f..89773ad 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js
@@ -27,7 +27,7 @@ }, hide_company: function() { - if(cur_frm.fields_dict.company) { + if(cur_frm?.fields_dict.company) { var companies = Object.keys(locals[":Company"] || {}); if(companies.length === 1) { if(!cur_frm.doc.company) cur_frm.set_value("company", companies[0]);