mirror of
https://github.com/zhigang1992/react-native-swiper.git
synced 2026-05-06 08:23:39 +08:00
fixes #3 & supports react-native 0.4.1
This commit is contained in:
@@ -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 +
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user