Skip to content

Commit 194a291

Browse files
authored
Fix overlay IE 11 compatibility (facebook#5203)
1 parent 1e1019a commit 194a291

File tree

1 file changed

+4
-3
lines changed
  • packages/react-error-overlay/src/utils

1 file changed

+4
-3
lines changed

packages/react-error-overlay/src/utils/mapper.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ async function map(
3434
});
3535
await settle(
3636
files.map(async fileName => {
37-
const fetchUrl = fileName.startsWith('webpack-internal:')
38-
? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
39-
: fileName;
37+
const fetchUrl =
38+
fileName.indexOf('webpack-internal:') === 0
39+
? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
40+
: fileName;
4041

4142
const fileSource = await fetch(fetchUrl).then(r => r.text());
4243
const map = await getSourceMap(fileName, fileSource);

0 commit comments

Comments
 (0)