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 {