Skip to content

Commit c93fa86

Browse files
author
Luca Forstner
committed
typo
1 parent 91bdf94 commit c93fa86

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/browser/src/stack-parsers.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,17 @@ function createFrame(filename: string, func: string, lineno?: number, colno?: nu
5151
}
5252

5353
// Chromium based browsers: Chrome, Brave, new Opera, new Edge
54-
const chromeRegex =
55-
/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
5654
const chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
5755

56+
// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor
57+
const chromeRegex = new RegExp(
58+
// every frame starts with whitespace and "at "
59+
/^\s*at /.source +
60+
/(?:(.+?(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/
61+
.source,
62+
'i',
63+
);
64+
5865
// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments
5966
// See: https://github.com/getsentry/sentry-javascript/issues/6880
6067
const chromeStackParserFn: StackLineParserFn = line => {

0 commit comments

Comments
 (0)