fixes #3 & supports react-native 0.4.1

This commit is contained in:
yuji
2015-04-29 02:28:34 +08:00
parent 21cb373257
commit 5de06a7aa8
278 changed files with 4857 additions and 4023 deletions

View File

@@ -28,7 +28,7 @@ type Exception = {
function handleException(e: Exception) {
var stack = parseErrorStack(e);
console.error(
'Error: ' +
'Err0r: ' +
'\n stack: \n' + stackToString(stack) +
'\n URL: ' + e.sourceURL +
'\n line: ' + e.line +

View File

@@ -7,8 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule loadSourceMap
*
* -- disabled flow due to mysterious validation errors --
* @flow
*/
'use strict';
@@ -40,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;