@@ -54,12 +54,11 @@ extend(Raven.prototype, {
5454 this . root = options . root || global . process . cwd ( ) ;
5555 this . transport = options . transport || transports [ this . dsn . protocol ] ;
5656 this . sendTimeout = options . sendTimeout || 1 ;
57- this . release = options . release || global . process . env . SENTRY_RELEASE || '' ;
57+ this . release = options . release || global . process . env . SENTRY_RELEASE ;
5858 this . environment =
5959 options . environment ||
6060 global . process . env . SENTRY_ENVIRONMENT ||
61- global . process . env . NODE_ENV ||
62- '' ;
61+ global . process . env . NODE_ENV ;
6362
6463 // autoBreadcrumbs: true enables all, autoBreadcrumbs: false disables all
6564 // autoBreadcrumbs: { http: true } enables a single type
@@ -68,7 +67,7 @@ extend(Raven.prototype, {
6867 this . maxBreadcrumbs = Math . max ( 0 , Math . min ( options . maxBreadcrumbs || 30 , 100 ) ) ;
6968
7069 this . captureUnhandledRejections = options . captureUnhandledRejections ;
71- this . loggerName = options . logger || '' ;
70+ this . loggerName = options . logger ;
7271 this . dataCallback = options . dataCallback ;
7372 this . shouldSendCallback = options . shouldSendCallback ;
7473 this . sampleRate = typeof options . sampleRate === 'undefined' ? 1 : options . sampleRate ;
@@ -266,11 +265,14 @@ extend(Raven.prototype, {
266265 kwargs . timestamp = new Date ( ) . toISOString ( ) . split ( '.' ) [ 0 ] ;
267266 kwargs . project = this . dsn . project_id ;
268267 kwargs . platform = 'node' ;
268+ kwargs . release = this . release ;
269269
270- // Only include release information if it is set
271- if ( this . release ) {
272- kwargs . release = this . release ;
273- }
270+ // Cleanup empty properties before sending them to the server
271+ Object . keys ( kwargs ) . forEach ( function ( key ) {
272+ if ( typeof kwargs [ key ] === 'undefined' || kwargs [ key ] === '' ) {
273+ delete kwargs [ key ] ;
274+ }
275+ } ) ;
274276
275277 if ( this . dataCallback ) {
276278 kwargs = this . dataCallback ( kwargs ) ;
0 commit comments