File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1356,7 +1356,7 @@ Raven.prototype = {
13561356
13571357 for ( var i = 0 ; i < breadcrumbs . values . length ; ++ i ) {
13581358 crumb = breadcrumbs . values [ i ] ;
1359- if ( ! crumb . hasOwnProperty ( 'data' ) )
1359+ if ( ! crumb . hasOwnProperty ( 'data' ) || ! isObject ( crumb . data ) )
13601360 continue ;
13611361
13621362 data = crumb . data ;
Original file line number Diff line number Diff line change @@ -151,6 +151,20 @@ describe('globals', function() {
151151 }
152152 } ]
153153 } ) ;
154+
155+ breadcrumbs = {
156+ values : [ {
157+ data : undefined
158+ } ]
159+ } ;
160+
161+ // see: https://github.com/getsentry/raven-js/issues/925
162+ Raven . _trimBreadcrumbs ( breadcrumbs ) ;
163+ assert . deepEqual ( breadcrumbs , {
164+ values : [ {
165+ data : undefined
166+ } ]
167+ } ) ;
154168 } ) ;
155169 } ) ;
156170
You can’t perform that action at this time.
0 commit comments