Skip to content

Commit 885f0a1

Browse files
committed
Support source maps for android
1 parent 66e6f98 commit 885f0a1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

plugins/react-native.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ var ASYNC_STORAGE_KEY = '--raven-js-global-error-payload--';
3131
* Strip device-specific IDs from React Native file:// paths
3232
*/
3333
function normalizeUrl(url, pathStripRe) {
34+
if (url.indexOf('/') != -1)
3435
return url
3536
.replace(/^file\:\/\//, '')
3637
.replace(pathStripRe, '');
38+
else
39+
return '/' + url;
3740
}
3841

3942
/**

vendor/TraceKit/tracekit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
381381
if (typeof ex.stack === 'undefined' || !ex.stack) return;
382382

383383
var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
384-
gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,
384+
gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
385385
winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
386386
lines = ex.stack.split('\n'),
387387
stack = [],

0 commit comments

Comments
 (0)