Skip to content

Commit 722bb75

Browse files
committed
make frames hold the reference to the event's frames
1 parent c6a5aab commit 722bb75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/browser/src/integrations/globalhandlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ function _eventFromRejectionWithPrimitive(reason: Primitive): Event {
155155

156156
// eslint-disable-next-line @typescript-eslint/no-explicit-any
157157
function _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {
158-
const frames: StackFrame[] = [];
158+
let frames: StackFrame[] = [];
159159
try {
160160
// @ts-expect-error - this is fine and done to reduce bundle size
161161
// we're catching the error if any of the properties in the chain is undefined
162-
frames.push(event.exception.values[0].stacktrace.frames);
162+
frames = event.exception.values[0].stacktrace.frames;
163163
} catch {
164164
// ignored
165165
}

0 commit comments

Comments
 (0)