Skip to content

Commit d74c8dd

Browse files
authored
Merge pull request #183 from getsentry/bugfix/non-native
Add check for native client in raven plugin for default error handler
2 parents 4d68c5c + 5ab5e08 commit d74c8dd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/raven-plugin.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,15 @@ function reactNativePlugin(Raven, options, internalDataCallback) {
137137
captureOptions[FATAL_ERROR_KEY] = error;
138138
}
139139
Raven.captureException(error, captureOptions);
140-
// We always want to tunnel errors to the default handler
141-
Sentry._setInternalEventStored(() => {
140+
if (options.nativeClientAvailable) {
141+
// We always want to tunnel errors to the default handler
142+
Sentry._setInternalEventStored(() => {
143+
defaultHandler(error, isFatal);
144+
});
145+
} else {
146+
// if we don't have a native
142147
defaultHandler(error, isFatal);
143-
});
148+
}
144149
});
145150
}
146151

0 commit comments

Comments
 (0)