From 97c1bcf14f3bc2495c5fa94227a0be053f25e9e3 Mon Sep 17 00:00:00 2001 From: Joel Mesmer Date: Thu, 17 Aug 2017 22:20:18 +0200 Subject: [PATCH 1/2] improvement for self-postbacks --- erpnext/templates/includes/product_page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js index 3905959928..658fa53588 100644 --- a/erpnext/templates/includes/product_page.js +++ b/erpnext/templates/includes/product_page.js @@ -73,7 +73,7 @@ frappe.ready(function() { } } - if (window.location.search.indexOf(item_code)!==-1) { + if (window.location.search == ("?variant=" + item_code)) { return; } From 6f50b3a5b2077e8636f114fe867550e06b73fdf3 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 29 Aug 2017 14:02:49 +0530 Subject: [PATCH 2/2] handle both cases --- erpnext/templates/includes/product_page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js index 658fa53588..b2d5ad952b 100644 --- a/erpnext/templates/includes/product_page.js +++ b/erpnext/templates/includes/product_page.js @@ -73,7 +73,7 @@ frappe.ready(function() { } } - if (window.location.search == ("?variant=" + item_code)) { + if (window.location.search == ("?variant=" + item_code) || window.location.search.includes(item_code)) { return; }