handle both cases
diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js
index 658fa53..b2d5ad9 100644
--- a/erpnext/templates/includes/product_page.js
+++ b/erpnext/templates/includes/product_page.js
@@ -73,7 +73,7 @@
 			}
 		}
 
-		if (window.location.search == ("?variant=" + item_code)) {
+		if (window.location.search == ("?variant=" + item_code) || window.location.search.includes(item_code)) {
 			return;
 		}