Unverified Commit 7f6c6f03 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Do not syntax highlight collapsed frames [ch1899] (#13684)

Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 4dd5616a
......@@ -68,9 +68,10 @@ export function getOriginalStackFrame(
error: false,
reason: null,
external: false,
expanded:
body.originalStackFrame?.file &&
!body.originalStackFrame.file.includes('node_modules'),
expanded: !Boolean(
/* collapsed */
body.originalStackFrame?.file?.includes('node_modules') ?? true
),
sourceStackFrame: source,
originalStackFrame: body.originalStackFrame,
originalCodeFrame: body.originalCodeFrame || null,
......
......@@ -178,7 +178,9 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) {
}
const originalCodeFrame: string | null =
posSourceContent && pos.line
!(originalFrame.file?.includes('node_modules') ?? true) &&
posSourceContent &&
pos.line
? (codeFrameColumns(
posSourceContent,
{ start: { line: pos.line, column: pos.column } },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment