We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e1019a commit 194a291Copy full SHA for 194a291
packages/react-error-overlay/src/utils/mapper.js
@@ -34,9 +34,10 @@ async function map(
34
});
35
await settle(
36
files.map(async fileName => {
37
- const fetchUrl = fileName.startsWith('webpack-internal:')
38
- ? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
39
- : fileName;
+ const fetchUrl =
+ fileName.indexOf('webpack-internal:') === 0
+ ? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
40
+ : fileName;
41
42
const fileSource = await fetch(fetchUrl).then(r => r.text());
43
const map = await getSourceMap(fileName, fileSource);
0 commit comments