Fix country selection
This commit is contained in:
@@ -63,8 +63,8 @@
|
|||||||
try {
|
try {
|
||||||
const response = await fetch('/cdn-cgi/trace');
|
const response = await fetch('/cdn-cgi/trace');
|
||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
const countryCodeMatch = text.match(/cf-ipcountry=(\w+)/);
|
const countryCodeMatch = text.match(/loc=(\w+)/);
|
||||||
const countryCode = countryCodeMatch ? countryCodeMatch[1] : 'BE';
|
const countryCode = countryCodeMatch ? countryCodeMatch[1] : '';
|
||||||
selectedCountry = countriesList[countryCode] || '';
|
selectedCountry = countriesList[countryCode] || '';
|
||||||
daysOff = ptoData[countryCode] || 0;
|
daysOff = ptoData[countryCode] || 0;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user