Skip to content

Commit 4c74bfa

Browse files
committed
Remove redundent check
1 parent 1bfb3aa commit 4c74bfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/browser/src/eventbuilder.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ export function eventFromPlainObject(
7171
},
7272
};
7373

74-
if (syntheticException && event.exception?.values?.[0]) {
74+
if (syntheticException) {
7575
const frames = parseStackFrames(syntheticException);
7676
if (frames.length) {
77-
event.exception.values[0].stacktrace = { frames };
77+
// event.exception.values[0] has been set above
78+
(event.exception as { values: Exception[] }).values[0].stacktrace = { frames };
7879
}
7980
}
8081

0 commit comments

Comments
 (0)