mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 12:45:37 +08:00
[react_native] JS files from D1999034: [react_native] Fix source maps on Android
This commit is contained in:
@@ -39,7 +39,10 @@ function fetchSourceMap(): Promise {
|
|||||||
.then(response => response.text())
|
.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 mapURL = SourceMapURL.getFrom(text);
|
||||||
var baseURL = url.match(/(.+:\/\/.*?)\//)[1];
|
var baseURL = url.match(/(.+:\/\/.*?)\//)[1];
|
||||||
return baseURL + mapURL;
|
return baseURL + mapURL;
|
||||||
|
|||||||
Reference in New Issue
Block a user