We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8441f95 commit 5be590aCopy full SHA for 5be590a
packages/react-error-overlay/src/utils/unmapper.js
@@ -56,6 +56,10 @@ async function unmap(
56
}
57
let { fileName } = frame;
58
if (fileName) {
59
+ // The web version of this module only provides POSIX support, so Windows
60
+ // paths like C:\foo\\baz\..\\bar\ cannot be normalized.
61
+ // A simple solution to this is to replace all `\` with `/`, then
62
+ // normalize afterwards.
63
fileName = path.normalize(fileName.replace(/[\\]+/g, '/'));
64
65
if (fileName == null) {
@@ -64,6 +68,7 @@ async function unmap(
68
const fN: string = fileName;
69
const source = map
66
70
.getSources()
71
+ // Prepare path for normalization; see comment above for reasoning.
67
72
.map(s => s.replace(/[\\]+/g, '/'))
73
.filter(p => {
74
p = path.normalize(p);
0 commit comments