Skip to content

Commit de75a63

Browse files
author
Luca Forstner
authored
fix(core): Determine debug ID paths from the top of the stack (#7722)
1 parent dae0c99 commit de75a63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/utils/prepareEvent.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ export function applyDebugMetadata(event: Event, stackParser: StackParser): void
127127
// Build a map of filename -> debug_id
128128
const filenameDebugIdMap = Object.keys(debugIdMap).reduce<Record<string, string>>((acc, debugIdStackTrace) => {
129129
const parsedStack = stackParser(debugIdStackTrace);
130-
for (const stackFrame of parsedStack) {
130+
for (let i = parsedStack.length - 1; i >= 0; i--) {
131+
const stackFrame = parsedStack[i];
131132
if (stackFrame.filename) {
132133
acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];
133134
break;

0 commit comments

Comments
 (0)