Skip to content

Commit 6a196fd

Browse files
author
Brian Vaughn
committed
Added zero-width space to component stack to prevent Chrome from formatting
1 parent 5243ef4 commit 6a196fd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/backend/console.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ function describeComponentFrame(
7777
const pathBeforeSlash = match[1];
7878
if (pathBeforeSlash) {
7979
const folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
80-
fileName = folderName + '/' + fileName;
80+
// Note the below string contains a zero width space after the "/" character.
81+
// This is to prevent browsers like Chrome from formatting the file name as a link.
82+
// (Since this is a source link, it would not work to open the source file anyway.)
83+
fileName = folderName + '/​' + fileName;
8184
}
8285
}
8386
}

0 commit comments

Comments
 (0)