File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 49
49
" sentry" ,
50
50
" raven"
51
51
],
52
- "typings" : " typescript/raven.d.ts"
52
+ "typings" : " typescript/raven.d.ts" ,
53
+ "dependencies" : {
54
+ "json-stringify-safe" : " ^5.0.1"
55
+ }
53
56
}
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
/*
@@ -1285,7 +1286,7 @@ Raven.prototype = {
1285
1286
// NOTE: auth is intentionally sent as part of query string (NOT as custom
1286
1287
// HTTP header) so as to avoid preflight CORS requests
1287
1288
request . open ( 'POST' , url + '?' + urlencode ( opts . auth ) ) ;
1288
- request . send ( JSON . stringify ( opts . data ) ) ;
1289
+ request . send ( stringify ( opts . data ) ) ;
1289
1290
} ,
1290
1291
1291
1292
// Note: this is shitty, but I can't figure out how to get
You can’t perform that action at this time.
0 commit comments