Skip to content

Commit

Permalink
fix: violent crash of vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
osher committed Aug 26, 2024
1 parent 9f78a91 commit 307661d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/utils/src/source-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,14 @@ export function parseSingleV8Stack(raw: string): ParsedStack | null {
}

export function parseStacktrace(
stack: string,
stack: string | Array<string>,
options: StackTraceParserOptions = {},
): ParsedStack[] {
const { ignoreStackEntries = stackIgnorePatterns } = options
let stacks = !CHROME_IE_STACK_REGEXP.test(stack)
? parseFFOrSafariStackTrace(stack)
: parseV8Stacktrace(stack)
const stackStr = Array.isArray(stack) ? stack.join("\n") : stack

Check failure on line 187 in packages/utils/src/source-map.ts

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Strings must use singlequote
let stacks = !CHROME_IE_STACK_REGEXP.test(stackStr)
? parseFFOrSafariStackTrace(stackStr)
: parseV8Stacktrace(stackStr)
if (ignoreStackEntries.length) {
stacks = stacks.filter(
stack => !ignoreStackEntries.some(p => stack.file.match(p)),
Expand Down

0 comments on commit 307661d

Please sign in to comment.