Skip to content

Commit

Permalink
Merge pull request #128 from radarlabs/user-agent
Browse files Browse the repository at this point in the history
improve userAgent logic
  • Loading branch information
nickpatrick authored Sep 20, 2023
2 parents 0c2cf27 + 97dce28 commit 3a7027f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "radar-sdk-js",
"version": "4.1.8",
"version": "4.1.9",
"description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.",
"homepage": "https://radar.com",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/api/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class VerifyAPI {
};

let userAgent = navigator.userAgent;
const windows = userAgent && userAgent.toLowerCase().includes('windows');
const mac = userAgent && userAgent.toLowerCase().includes('mac');

const response: any = await Http.request({
method: 'GET',
path: 'verify',
data: body,
host: windows ? 'http://localhost:52516' : 'https://radar-verify.com:52516',
host: mac ? 'https://radar-verify.com:52516' : 'http://localhost:52516',
});

const { user, events, token } = response;
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '4.1.8';
export default '4.1.9';

0 comments on commit 3a7027f

Please sign in to comment.