@posthog/core 1.24.3 → 1.24.4
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/dist/utils/type-utils.js
CHANGED
|
@@ -106,7 +106,7 @@ function isErrorEvent(event) {
|
|
|
106
106
|
return isBuiltin(event, 'ErrorEvent');
|
|
107
107
|
}
|
|
108
108
|
function isEvent(candidate) {
|
|
109
|
-
return
|
|
109
|
+
return 'undefined' != typeof Event && isInstanceOf(candidate, Event);
|
|
110
110
|
}
|
|
111
111
|
function isPlainObject(candidate) {
|
|
112
112
|
return isBuiltin(candidate, 'Object');
|
|
@@ -51,7 +51,7 @@ function isErrorEvent(event) {
|
|
|
51
51
|
return isBuiltin(event, 'ErrorEvent');
|
|
52
52
|
}
|
|
53
53
|
function isEvent(candidate) {
|
|
54
|
-
return
|
|
54
|
+
return 'undefined' != typeof Event && isInstanceOf(candidate, Event);
|
|
55
55
|
}
|
|
56
56
|
function isPlainObject(candidate) {
|
|
57
57
|
return isBuiltin(candidate, 'Object');
|
package/package.json
CHANGED
package/src/utils/type-utils.ts
CHANGED
|
@@ -119,7 +119,7 @@ export function isErrorEvent(event: unknown): boolean {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export function isEvent(candidate: unknown): candidate is Event {
|
|
122
|
-
return
|
|
122
|
+
return typeof Event !== 'undefined' && isInstanceOf(candidate, Event)
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export function isPlainObject(candidate: unknown): candidate is Record<string, unknown> {
|