From be81442c82e004f4a02914771f06cfd7d1750ce2 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Thu, 27 Oct 2016 09:49:22 +0530 Subject: [PATCH] [minor] link formatter fixes for Item and Employee --- erpnext/public/js/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 6c8898dab0..39e87f86f8 100644 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -192,7 +192,7 @@ erpnext.utils.map_current_doc = function(opts) { frappe.form.link_formatters['Item'] = function(value, doc) { if(doc && doc.item_name && doc.item_name !== value) { - return value + ': ' + doc.item_name; + return value? value + ': ' + doc.item_name: doc.item_name; } else { return value; } @@ -200,7 +200,7 @@ frappe.form.link_formatters['Item'] = function(value, doc) { frappe.form.link_formatters['Employee'] = function(value, doc) { if(doc && doc.employee_name && doc.employee_name !== value) { - return value + ': ' + doc.employee_name; + return value? value + ': ' + doc.employee_name: doc.employee_name; } else { return value; }