fix: type error for missing frm obj
(cherry picked from commit 20fa3da950
)
This commit is contained in:
parent
9f8a27833a
commit
6b5e1cfeb7
@ -27,7 +27,7 @@ $.extend(erpnext, {
|
||||
},
|
||||
|
||||
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]);
|
||||
|
Loading…
Reference in New Issue
Block a user