Skip to content

Commit 30bb8b5

Browse files
authored
fix(utils): Do not use Event type in worldwide (#9864)
As that is browser only. Closes #9860
1 parent da8c9c3 commit 30bb8b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/utils/src/instrument/globalError.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function instrumentError(): void {
2121
_oldOnErrorHandler = GLOBAL_OBJ.onerror;
2222

2323
GLOBAL_OBJ.onerror = function (
24-
msg: string | Event,
24+
msg: string | object,
2525
url?: string,
2626
line?: number,
2727
column?: number,

packages/utils/src/worldwide.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface InternalGlobal {
2424
Integrations?: Integration[];
2525
};
2626
onerror?: {
27-
(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
27+
(event: object | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
2828
__SENTRY_INSTRUMENTED__?: true;
2929
__SENTRY_LOADER__?: true;
3030
};

0 commit comments

Comments
 (0)