Skip to content

Commit

Permalink
Fix overlay IE 11 compatibility (#5203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer authored Oct 1, 2018
1 parent 1e1019a commit 194a291
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-error-overlay/src/utils/mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ async function map(
});
await settle(
files.map(async fileName => {
const fetchUrl = fileName.startsWith('webpack-internal:')
? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
: fileName;
const fetchUrl =
fileName.indexOf('webpack-internal:') === 0
? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
: fileName;

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

0 comments on commit 194a291

Please sign in to comment.