mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
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;
|
||||
const stackFrame = error.stack?.[0];
|
||||
if (stackFrame) {
|
||||
const file = stackFrame.file.replace(/.*\/(.*)/, '$1');
|
||||
const file = stackFrame.file.replace(/.*[/\\](.*)/, '$1');
|
||||
location = file + ':' + stackFrame.line;
|
||||
longLocation = stackFrame.file + ':' + stackFrame.line;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user