From 2818b5bbe7990022c3e811ea8a212c48577f3847 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 16 Sep 2019 15:16:38 +0530 Subject: [PATCH] fix: 'link to material request' button not showing any message if no Material Request found (#19064) --- erpnext/public/js/controllers/buying.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 118aee9a8c5..02c30587f67 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -293,7 +293,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ items: my_items }, callback: function(r) { - if(!r.message) { + if(!r.message || r.message.length == 0) { frappe.throw(__("No pending Material Requests found to link for the given items.")) } else {