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 1313 "url" : " git://github.com/getsentry/raven-js.git"
1414 },
1515 "main" : " src/singleton.js" ,
16+ "dependencies" : {
17+ "json-stringify-safe" : " ^5.0.1"
18+ },
1619 "devDependencies" : {
1720 "browserify-versionify" : " ^1.0.6" ,
1821 "bundle-collapser" : " ^1.2.1" ,
Original file line number Diff line number Diff line change 44var TraceKit = require ( '../vendor/TraceKit/tracekit' ) ;
55var RavenConfigError = require ( './configError' ) ;
66var utils = require ( './utils' ) ;
7+ var stringify = require ( 'json-stringify-safe' ) ;
78
89var isFunction = utils . isFunction ;
910var isUndefined = utils . isUndefined ;
@@ -428,7 +429,7 @@ Raven.prototype = {
428429 */
429430 getContext : function ( ) {
430431 // lol javascript
431- return JSON . parse ( JSON . stringify ( this . _globalContext ) ) ;
432+ return JSON . parse ( stringify ( this . _globalContext ) ) ;
432433 } ,
433434
434435
@@ -1314,7 +1315,7 @@ Raven.prototype = {
13141315 // NOTE: auth is intentionally sent as part of query string (NOT as custom
13151316 // HTTP header) so as to avoid preflight CORS requests
13161317 request . open ( 'POST' , url + '?' + urlencode ( opts . auth ) ) ;
1317- request . send ( JSON . stringify ( opts . data ) ) ;
1318+ request . send ( stringify ( opts . data ) ) ;
13181319 } ,
13191320
13201321 _logDebug : function ( level ) {
You can’t perform that action at this time.
0 commit comments