From edbadcb6516d396193888c1a7467e81a8af04fc5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 12 Dec 2023 15:35:38 +0530 Subject: [PATCH] fix: typeerror on new sites --- erpnext/public/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 25fc754b9ae1..e9d06dfbec2c 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -8,7 +8,7 @@ $.extend(erpnext, { if(!company && cur_frm) company = cur_frm.doc.company; if(company) - return frappe.get_doc(":Company", company).default_currency || frappe.boot.sysdefaults.currency; + return frappe.get_doc(":Company", company)?.default_currency || frappe.boot.sysdefaults.currency; else return frappe.boot.sysdefaults.currency; },