We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8997f58 commit 19eadc2Copy full SHA for 19eadc2
packages/react-error-overlay/src/components/frame.js
@@ -149,7 +149,7 @@ function createFrame(
149
let url;
150
if (!compiled && sourceFileName && sourceLineNumber) {
151
// Remove everything up to the first /src/
152
- const trimMatch = /.*?[/|\\](src[/|\\].*)/.exec(sourceFileName);
+ const trimMatch = /^[/|\\].*?[/|\\](src[/|\\].*)/.exec(sourceFileName);
153
if (trimMatch && trimMatch[1]) sourceFileName = trimMatch[1];
154
155
url = sourceFileName + ':' + sourceLineNumber;
0 commit comments