posthog-js 1.32.1 → 1.32.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/CHANGELOG.md +4 -0
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/es.js +31 -25
- package/dist/es.js.map +1 -1
- package/dist/module.d.ts +1 -2
- package/dist/module.js +31 -25
- package/dist/module.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/dist/es.js
CHANGED
|
@@ -881,7 +881,7 @@ var LZString = {
|
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
883
|
|
|
884
|
-
var version = "1.32.
|
|
884
|
+
var version = "1.32.2";
|
|
885
885
|
|
|
886
886
|
// e.g. Config.DEBUG = Config.DEBUG || instance.get_config('debug')
|
|
887
887
|
|
|
@@ -4056,33 +4056,39 @@ var Decide = /*#__PURE__*/function () {
|
|
|
4056
4056
|
this.instance['compression'] = {};
|
|
4057
4057
|
}
|
|
4058
4058
|
|
|
4059
|
-
if (response['inject']
|
|
4060
|
-
|
|
4061
|
-
|
|
4059
|
+
if (response['inject']) {
|
|
4060
|
+
if (this.instance.get_config('opt_in_web_app_injection')) {
|
|
4061
|
+
var apiHost = this.instance.get_config('api_host');
|
|
4062
4062
|
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
var
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
config
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4063
|
+
var _iterator2 = _createForOfIteratorHelper(response['inject']),
|
|
4064
|
+
_step2;
|
|
4065
|
+
|
|
4066
|
+
try {
|
|
4067
|
+
var _loop = function _loop() {
|
|
4068
|
+
var _step2$value = _step2.value,
|
|
4069
|
+
id = _step2$value.id,
|
|
4070
|
+
url = _step2$value.url;
|
|
4071
|
+
var script = document.createElement('script');
|
|
4072
|
+
script.src = [apiHost, apiHost[apiHost.length - 1] === '/' && url[0] === '/' ? url.substring(1) : url].join('');
|
|
4073
|
+
|
|
4074
|
+
script.onerror = function (e) {
|
|
4075
|
+
console.error("Error while initializing PostHog app with config id ".concat(id), e);
|
|
4076
|
+
};
|
|
4077
|
+
|
|
4078
|
+
window["__$$ph_web_js_".concat(id)] = _this2.instance;
|
|
4079
|
+
document.body.appendChild(script);
|
|
4080
|
+
};
|
|
4081
|
+
|
|
4082
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
4083
|
+
_loop();
|
|
4080
4084
|
}
|
|
4085
|
+
} catch (err) {
|
|
4086
|
+
_iterator2.e(err);
|
|
4087
|
+
} finally {
|
|
4088
|
+
_iterator2.f();
|
|
4081
4089
|
}
|
|
4082
|
-
}
|
|
4083
|
-
|
|
4084
|
-
} finally {
|
|
4085
|
-
_iterator2.f();
|
|
4090
|
+
} else if (response['inject'].length > 0) {
|
|
4091
|
+
console.error('PostHog app injection was requested, but is disabled. Enable the "opt_in_web_app_injection" config to proceed.');
|
|
4086
4092
|
}
|
|
4087
4093
|
}
|
|
4088
4094
|
}
|