(frame: StackFrame)
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | return event; |
| 75 | } |
| 76 | |
| 77 | function scrubStackFrame(frame: StackFrame): void { |
| 78 | if (frame.filename) { |
| 79 | frame.filename = scrubPathsInString(frame.filename); |
| 80 | } |
| 81 | if (frame.abs_path) { |
| 82 | frame.abs_path = scrubPathsInString(frame.abs_path); |
| 83 | } |
| 84 | if (frame.context_line) { |
| 85 | frame.context_line = scrubPathsInString(frame.context_line); |
| 86 | } |
| 87 | if (frame.pre_context?.length) { |
| 88 | frame.pre_context = frame.pre_context.map(scrubPathsInString); |
| 89 | } |
| 90 | if (frame.post_context?.length) { |
| 91 | frame.post_context = frame.post_context.map(scrubPathsInString); |
| 92 | } |
| 93 | if (frame.vars && typeof frame.vars === 'object') { |
| 94 | for (const key of Object.keys(frame.vars)) { |
| 95 | const v = frame.vars[key]; |
| 96 | if (typeof v === 'string') { |
| 97 | frame.vars[key] = scrubPathsInString(v); |
| 98 | } |
| 99 | } |
no test coverage detected