Skip to content

Commit 8fdfbe4

Browse files
committed
Revert "Fixes #169 - Add check for native client to not persist payload in js"
This reverts commit c25812d.
1 parent bbbc182 commit 8fdfbe4

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

lib/raven-plugin.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,15 @@ function reactNativePlugin(Raven, options, internalDataCallback) {
7979
})
8080
);
8181

82-
if (options.nativeClientAvailable && options.nativeClientAvailable === false) {
83-
// Check for a previously persisted payload, and report it.
84-
reactNativePlugin._restorePayload().then(function(payload) {
85-
options.onInitialize && options.onInitialize(payload);
86-
if (!payload) return;
87-
Raven._sendProcessedPayload(payload, function(error) {
88-
if (error) return; // Try again next launch.
89-
reactNativePlugin._clearPayload();
90-
});
91-
})['catch'](function() {});
92-
}
82+
// Check for a previously persisted payload, and report it.
83+
reactNativePlugin._restorePayload().then(function(payload) {
84+
options.onInitialize && options.onInitialize(payload);
85+
if (!payload) return;
86+
Raven._sendProcessedPayload(payload, function(error) {
87+
if (error) return; // Try again next launch.
88+
reactNativePlugin._clearPayload();
89+
});
90+
})['catch'](function() {});
9391

9492
Raven.setShouldSendCallback(function(data, originalCallback) {
9593
if (!(FATAL_ERROR_KEY in data)) {
@@ -100,13 +98,11 @@ function reactNativePlugin(Raven, options, internalDataCallback) {
10098
var origError = data[FATAL_ERROR_KEY];
10199
delete data[FATAL_ERROR_KEY];
102100

103-
if (options.nativeClientAvailable && options.nativeClientAvailable === false) {
104-
reactNativePlugin._persistPayload(data).then(function() {
105-
defaultHandler(origError, true);
106-
handlingFatal = false; // In case it isn't configured to crash.
107-
return null;
108-
})['catch'](function() {});
109-
}
101+
reactNativePlugin._persistPayload(data).then(function() {
102+
defaultHandler(origError, true);
103+
handlingFatal = false; // In case it isn't configured to crash.
104+
return null;
105+
})['catch'](function() {});
110106

111107
return false; // Do not continue.
112108
});

0 commit comments

Comments
 (0)