diff --git a/Libraries/JavaScriptAppEngine/Initialization/SourceMapsUtils.js b/Libraries/JavaScriptAppEngine/Initialization/SourceMapsUtils.js index f49a107c1..ecd6d8272 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/SourceMapsUtils.js +++ b/Libraries/JavaScriptAppEngine/Initialization/SourceMapsUtils.js @@ -34,13 +34,20 @@ var SourceMapsUtils = { .then(map => new SourceMapConsumer(map)); }, - extractSourceMapURL(data: ({url:string, text:string})): ?string { + extractSourceMapURL(data: ({url?:string, text?:string, fullSourceMappingURL?:string})): ?string { const url = data.url; const text = data.text; + const fullSourceMappingURL = data.fullSourceMappingURL; + if (fullSourceMappingURL) { + return fullSourceMappingURL; + } var mapURL = SourceMapURL.getFrom(text); if (!mapURL) { return null; } + if (!url) { + return null; + } var baseURLs = url.match(/(.+:\/\/.*?)\//); if (!baseURLs || baseURLs.length < 2) { return null;