Skip to content

Commit a5bc7b0

Browse files
committed
fixes
1 parent fbfaee9 commit a5bc7b0

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

greip.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const GeoIP = (options: Options) => {
2424
lang1 = lang1.toUpperCase();
2525

2626
// GFP data
27-
const gfp_data = getGFP();
27+
const gfpData = getGFP();
2828

2929
// Validate the params variable items
3030
params.forEach((perParam) => {
@@ -87,7 +87,7 @@ export const GeoIP = (options: Options) => {
8787
resolve(res);
8888
},
8989
{
90-
gfp: gfp_data,
90+
gfp: gfpData,
9191
},
9292
);
9393
});

src/util.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,16 @@ export const getGFP = () => {
6161
const plugins =
6262
typeof navigator.plugins !== 'undefined' ? Array.from(navigator.plugins).map((plugin) => plugin.name) : null;
6363

64-
let gfpData = {
64+
const gfpData = JSON.stringify({
6565
timezone,
6666
primary_language: primaryLanguage,
6767
preferred_languages: preferredLanguages,
6868
screen_width: screenWidth,
6969
screen_height: screenHeight,
7070
plugins,
71-
};
72-
73-
const gfp_data = JSON.stringify(gfpData);
71+
});
7472

75-
return gfp_data;
73+
return gfpData;
7674
} catch (error) {
7775
return null;
7876
}

0 commit comments

Comments
 (0)