Skip to content

Commit

Permalink
fix: type error for missing frm obj
Browse files Browse the repository at this point in the history
(cherry picked from commit 20fa3da)
  • Loading branch information
GursheenK authored and mergify[bot] committed Feb 27, 2024
1 parent 9f8a278 commit 6b5e1cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/public/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 6b5e1cf

Please sign in to comment.