posthog-js-lite 3.4.0 → 3.4.1
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 +6 -0
- package/lib/index.cjs.js +6 -3
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +6 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/index.d.ts +1 -1
- package/lib/posthog-core/src/utils.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/index.cjs.js
CHANGED
|
@@ -66,6 +66,9 @@ function safeSetTimeout(fn, timeout) {
|
|
|
66
66
|
t?.unref && t?.unref();
|
|
67
67
|
return t;
|
|
68
68
|
}
|
|
69
|
+
const isError = (x) => {
|
|
70
|
+
return x instanceof Error;
|
|
71
|
+
};
|
|
69
72
|
function getFetch() {
|
|
70
73
|
return typeof fetch !== 'undefined' ? fetch : typeof global.fetch !== 'undefined' ? global.fetch : undefined;
|
|
71
74
|
}
|
|
@@ -1928,8 +1931,8 @@ class PostHogCore extends PostHogCoreStateless {
|
|
|
1928
1931
|
$exception_level: 'error',
|
|
1929
1932
|
$exception_list: [
|
|
1930
1933
|
{
|
|
1931
|
-
type: error.name,
|
|
1932
|
-
value: error.message,
|
|
1934
|
+
type: isError(error) ? error.name : 'Error',
|
|
1935
|
+
value: isError(error) ? error.message : error,
|
|
1933
1936
|
mechanism: {
|
|
1934
1937
|
handled: true,
|
|
1935
1938
|
synthetic: false,
|
|
@@ -1967,7 +1970,7 @@ class PostHogCore extends PostHogCoreStateless {
|
|
|
1967
1970
|
}
|
|
1968
1971
|
}
|
|
1969
1972
|
|
|
1970
|
-
var version = "3.4.
|
|
1973
|
+
var version = "3.4.1";
|
|
1971
1974
|
|
|
1972
1975
|
function getContext(window) {
|
|
1973
1976
|
let context = {};
|