diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cea8b69f..58e2407be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.194.4 - 2024-12-05 + +- feat: RemoteConfig loader (#1577) + +## 1.194.3 - 2024-12-03 + +- fix: parse Chrome instead of Android as browser (#1575) + ## 1.194.2 - 2024-12-02 - fix: use previous site-app variables (#1574) diff --git a/package.json b/package.json index 0fde770ed..4a42b0052 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "posthog-js", - "version": "1.194.2", + "version": "1.194.4", "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", "repository": "https://github.com/PostHog/posthog-js", "author": "hey@posthog.com", diff --git a/src/__tests__/utils/event-utils.test.ts b/src/__tests__/utils/event-utils.test.ts index 09b75c2b0..973d9238d 100644 --- a/src/__tests__/utils/event-utils.test.ts +++ b/src/__tests__/utils/event-utils.test.ts @@ -229,11 +229,11 @@ describe(`event-utils`, () => { expectedBrowser: 'Android Mobile', }, { - name: 'Android Browser on Galaxy S3', + name: 'Chrome Browser on Galaxy S3', userAgent: 'Mozilla/5.0 (Linux; Android 4.4.4; en-us; SAMSUNG GT-I9300I Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36', - expectedVersion: 4.4, - expectedBrowser: 'Android Mobile', + expectedVersion: 28.0, + expectedBrowser: 'Chrome', }, ] diff --git a/src/utils/user-agent-utils.ts b/src/utils/user-agent-utils.ts index 7ba95c034..bd91213fa 100644 --- a/src/utils/user-agent-utils.ts +++ b/src/utils/user-agent-utils.ts @@ -113,10 +113,10 @@ export const detectBrowser = function (user_agent: string, vendor: string | unde return CHROME_IOS // why not just Chrome? } else if (includes(user_agent, 'CrMo')) { return CHROME - } else if (includes(user_agent, ANDROID) && includes(user_agent, SAFARI)) { - return ANDROID_MOBILE } else if (includes(user_agent, CHROME)) { return CHROME + } else if (includes(user_agent, ANDROID) && includes(user_agent, SAFARI)) { + return ANDROID_MOBILE } else if (includes(user_agent, 'FxiOS')) { return FIREFOX_IOS } else if (includes(user_agent.toLowerCase(), KONQUEROR.toLowerCase())) {