Skip to content

Commit 997a782

Browse files
cawa-93kamilogorek
andauthored
fix: Run rewriting for both Exaption and Stacktrace events (#3653)
* fix: Run rewriting for both Exaption and Stacktrace events * fix: no-param-reassign rule Co-authored-by: Kamil Ogórek <[email protected]>
1 parent b61dcdf commit 997a782

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/integrations/src/rewriteframes.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,18 @@ export class RewriteFrames implements Integration {
5454
}
5555

5656
/** JSDoc */
57-
public process(event: Event): Event {
58-
if (event.exception && Array.isArray(event.exception.values)) {
59-
return this._processExceptionsEvent(event);
57+
public process(originalEvent: Event): Event {
58+
let processedEvent = originalEvent;
59+
60+
if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {
61+
processedEvent = this._processExceptionsEvent(processedEvent);
6062
}
6163

62-
if (event.stacktrace) {
63-
return this._processStacktraceEvent(event);
64+
if (originalEvent.stacktrace) {
65+
processedEvent = this._processStacktraceEvent(processedEvent);
6466
}
6567

66-
return event;
68+
return processedEvent;
6769
}
6870

6971
/**

0 commit comments

Comments
 (0)