I'm having a strange situation where my product doesn't have any variants but the Url is showing variant id in the product link of the shopping cart...
ex) www.website.com/products/singleProduct?variant=12345678901
I've tried setting enableHistoryState to false,
enableHistoryState: false
and also removing
if (!history.replaceState || !variant) {
return;
}
var newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?variant=' + variant.id;
window.history.replaceState({path: newurl}, '', newurl);
but these changes don't work.
And I actually don't want to remove these code either because I do have some products with variants. I'm just wondering why the product is showing variant id in the url without having a variant...