File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 13
13
"url" : " git://github.com/getsentry/raven-js.git"
14
14
},
15
15
"main" : " src/singleton.js" ,
16
+ "dependencies" : {
17
+ "json-stringify-safe" : " ^5.0.1"
18
+ },
16
19
"devDependencies" : {
17
20
"browserify-versionify" : " ^1.0.6" ,
18
21
"bundle-collapser" : " ^1.2.1" ,
Original file line number Diff line number Diff line change 4
4
var TraceKit = require ( '../vendor/TraceKit/tracekit' ) ;
5
5
var RavenConfigError = require ( './configError' ) ;
6
6
var utils = require ( './utils' ) ;
7
+ var stringify = require ( 'json-stringify-safe' ) ;
7
8
8
9
var isFunction = utils . isFunction ;
9
10
var isUndefined = utils . isUndefined ;
@@ -428,7 +429,7 @@ Raven.prototype = {
428
429
*/
429
430
getContext : function ( ) {
430
431
// lol javascript
431
- return JSON . parse ( JSON . stringify ( this . _globalContext ) ) ;
432
+ return JSON . parse ( stringify ( this . _globalContext ) ) ;
432
433
} ,
433
434
434
435
@@ -1314,7 +1315,7 @@ Raven.prototype = {
1314
1315
// NOTE: auth is intentionally sent as part of query string (NOT as custom
1315
1316
// HTTP header) so as to avoid preflight CORS requests
1316
1317
request . open ( 'POST' , url + '?' + urlencode ( opts . auth ) ) ;
1317
- request . send ( JSON . stringify ( opts . data ) ) ;
1318
+ request . send ( stringify ( opts . data ) ) ;
1318
1319
} ,
1319
1320
1320
1321
_logDebug : function ( level ) {
You can’t perform that action at this time.
0 commit comments