Skip to content

Commit dfdd247

Browse files
committed
Tell react-native plugin to use the right stacktrace
1 parent a52ba5f commit dfdd247

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/react-native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ module.exports = function (Raven) {
6464
data.culprit = normalizeUrl(data.culprit);
6565
}
6666

67-
if (data.stacktrace && data.stacktrace.frames && data.stacktrace.frames.length) {
68-
data.stacktrace.frames.forEach(function (frame) {
67+
if (data.exception) {
68+
// if data.exception exists, all of the other keys are guaranteed to exist
69+
data.exception.values[0].stacktrace.frames.forEach(function (frame) {
6970
frame.filename = normalizeUrl(frame.filename);
7071
});
7172
}

0 commit comments

Comments
 (0)