posthog-js 1.84.1 → 1.84.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.84.1",
3
+ "version": "1.84.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",
@@ -35,7 +35,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
35
35
  return to.concat(ar || Array.prototype.slice.call(from));
36
36
  };
37
37
  import Config from './config';
38
- import { _copyAndTruncateStrings, _each, _eachArray, _extend, _info, _isArray, _isBlockedUA, _isEmptyObject, _isObject, _isUndefined, _register_event, _safewrap_class, document, userAgent, window, logger, } from './utils';
38
+ import { _copyAndTruncateStrings, _each, _eachArray, _extend, _info, _isArray, _isBlockedUA, _isEmptyObject, _isObject, _isUndefined, _register_event, _safewrap_class, document, userAgent, window, logger, isCrossDomainCookie, } from './utils';
39
39
  import { autocapture } from './autocapture';
40
40
  import { PostHogFeatureFlags } from './posthog-featureflags';
41
41
  import { PostHogPersistence } from './posthog-persistence';
@@ -90,7 +90,7 @@ var USE_XHR = window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()
90
90
  // should only be true for Opera<12
91
91
  var ENQUEUE_REQUESTS = !USE_XHR && userAgent.indexOf('MSIE') === -1 && userAgent.indexOf('Mozilla') === -1;
92
92
  var defaultConfig = function () {
93
- var _a, _b, _c;
93
+ var _a;
94
94
  return ({
95
95
  api_host: 'https://app.posthog.com',
96
96
  api_method: 'POST',
@@ -99,7 +99,7 @@ var defaultConfig = function () {
99
99
  token: '',
100
100
  autocapture: true,
101
101
  rageclick: true,
102
- cross_subdomain_cookie: ((_b = (_a = document === null || document === void 0 ? void 0 : document.location) === null || _a === void 0 ? void 0 : _a.hostname) === null || _b === void 0 ? void 0 : _b.indexOf('herokuapp.com')) === -1,
102
+ cross_subdomain_cookie: isCrossDomainCookie(document === null || document === void 0 ? void 0 : document.location),
103
103
  persistence: 'cookie',
104
104
  persistence_name: '',
105
105
  cookie_name: '',
@@ -118,7 +118,7 @@ var defaultConfig = function () {
118
118
  disable_persistence: false,
119
119
  disable_cookie: false,
120
120
  enable_recording_console_log: undefined,
121
- secure_cookie: ((_c = window === null || window === void 0 ? void 0 : window.location) === null || _c === void 0 ? void 0 : _c.protocol) === 'https:',
121
+ secure_cookie: ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.protocol) === 'https:',
122
122
  ip: true,
123
123
  opt_out_capturing_by_default: false,
124
124
  opt_out_persistence_by_default: false,