fix(trace viewer): correctly trim locations on Windows (#29321)
Signed-off-by: Max Schmitt <max@schmitt.mx> Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
This commit is contained in:
parent
ab95aabec5
commit
7d64ca4c54
|
|
@ -56,7 +56,7 @@ export const ErrorsTab: React.FunctionComponent<{
|
||||||
let longLocation: string | undefined;
|
let longLocation: string | undefined;
|
||||||
const stackFrame = error.stack?.[0];
|
const stackFrame = error.stack?.[0];
|
||||||
if (stackFrame) {
|
if (stackFrame) {
|
||||||
const file = stackFrame.file.replace(/.*\/(.*)/, '$1');
|
const file = stackFrame.file.replace(/.*[/\\](.*)/, '$1');
|
||||||
location = file + ':' + stackFrame.line;
|
location = file + ':' + stackFrame.line;
|
||||||
longLocation = stackFrame.file + ':' + stackFrame.line;
|
longLocation = stackFrame.file + ':' + stackFrame.line;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue