[react_native] JS files from D1999034: [react_native] Fix source maps on Android

This commit is contained in:
Andy Street
2015-04-22 03:45:08 -07:00
parent 58a550fa06
commit 0f7ebf23a9

View File

@@ -39,7 +39,10 @@ function fetchSourceMap(): Promise {
.then(response => response.text())
}
function extractSourceMapURL({url, text}): string {
function extractSourceMapURL({url, text, fullSourceMappingURL}): string {
if (fullSourceMappingURL) {
return fullSourceMappingURL;
}
var mapURL = SourceMapURL.getFrom(text);
var baseURL = url.match(/(.+:\/\/.*?)\//)[1];
return baseURL + mapURL;