Fix overlay IE 11 compatibility (#5203)

This commit is contained in:
Joe Haddad
2018-10-01 12:12:25 -04:00
committed by GitHub
parent 1e1019abbd
commit 194a29102f

View File

@@ -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);