Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugins/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// /var/containers/Bundle/Application/{DEVICE_ID}/HelloWorld.app/main.jsbundle

var PATH_STRIP_RE = /^.*\/[^\.]+(\.app|CodePush)/;

var stringify = require('json-stringify-safe');
var FATAL_ERROR_KEY = '--rn-fatal--';
var ASYNC_STORAGE_KEY = '--raven-js-global-error-payload--';

Expand Down Expand Up @@ -137,7 +137,7 @@ function reactNativePlugin(Raven, options) {
*/
reactNativePlugin._persistPayload = function(payload) {
var AsyncStorage = require('react-native').AsyncStorage;
return AsyncStorage.setItem(ASYNC_STORAGE_KEY, JSON.stringify(payload))
return AsyncStorage.setItem(ASYNC_STORAGE_KEY, stringify(payload))
['catch'](function() { return null; });
}

Expand Down Expand Up @@ -198,7 +198,7 @@ reactNativePlugin._transport = function (options) {
// Just set a phony Origin value; only matters if Sentry Project is configured
// to whitelist specific origins.
request.setRequestHeader('Origin', 'react-native://');
request.send(JSON.stringify(options.data));
request.send(stringify(options.data));
};

/**
Expand Down