Skip to content

Commit 9bbf663

Browse files
authored
Merge pull request #733 from bitdefender/DEX-26514
DEX-26514 - force_country paramter broken value
2 parents 7c78f9a + 9f2bc81 commit 9bbf663

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

_src-lp/scripts/vendor/store2015.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ window.StoreProducts.initSelector = function (config) {
192192
}
193193
} else {
194194
// ex: www.bitdefender.com/business/fr/bsp-flashsale
195-
let country_from_path = window.location.pathname.split('/')[2];
195+
const currentPath = window.location.pathname;
196+
const parts = currentPath.split('/');
197+
let country_from_path = currentPath.includes('/pages/') ? parts[3] : parts[2];
198+
199+
if (country_from_path === 'en') country_from_path = 'us';
200+
196201
const force_country = country_from_path;
197202
if (extra_params == null) {
198203
extra_params = { force_country: force_country };

0 commit comments

Comments
 (0)