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]);