From 3c66b27a0db402c910b1a876e365e34a90a7fcd8 Mon Sep 17 00:00:00 2001 From: tunde Date: Wed, 24 May 2017 17:05:08 +0100 Subject: [PATCH] fixes frappe/erpnext#8965: Get item inside Request for Quote --- frappe/public/js/frappe/model/sync.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frappe/public/js/frappe/model/sync.js b/frappe/public/js/frappe/model/sync.js index 829ee5753d..6dd2433fc6 100644 --- a/frappe/public/js/frappe/model/sync.js +++ b/frappe/public/js/frappe/model/sync.js @@ -8,14 +8,14 @@ $.extend(frappe.model, { extract docs, docinfo (attachments, comments, assignments) from incoming request and set in `locals` and `frappe.model.docinfo` */ - + var isPlain; if(!r.docs && !r.docinfo) r = {docs:r}; - if($.isPlainObject(r.docs)) r.docs = [r.docs]; + isPlain = $.isPlainObject(r.docs); + if(isPlain) r.docs = [r.docs]; if(r.docs) { var last_parent_name = null; - var dirty = []; for(var i=0, l=r.docs.length; i