posthog-js 1.98.1 → 1.98.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-js",
3
- "version": "1.98.1",
3
+ "version": "1.98.2",
4
4
  "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
5
5
  "repository": "https://github.com/PostHog/posthog-js",
6
6
  "author": "hey@posthog.com",
@@ -1563,6 +1563,10 @@ var PostHog = /** @class */ (function () {
1563
1563
  }
1564
1564
  // We assume the api_host is without a trailing slash in most places throughout the codebase
1565
1565
  this.config.api_host = this.config.api_host.replace(/\/$/, '');
1566
+ // us.posthog.com is only for the web app, so we don't allow that to be used as a capture endpoint
1567
+ if (this.config.api_host === 'https://us.posthog.com') {
1568
+ this.config.api_host = 'https://app.posthog.com';
1569
+ }
1566
1570
  (_a = this.persistence) === null || _a === void 0 ? void 0 : _a.update_config(this.config);
1567
1571
  (_b = this.sessionPersistence) === null || _b === void 0 ? void 0 : _b.update_config(this.config);
1568
1572
  if (localStore.is_supported() && localStore.get('ph_debug') === 'true') {