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 = {
1356
1356
1357
1357
for ( var i = 0 ; i < breadcrumbs . values . length ; ++ i ) {
1358
1358
crumb = breadcrumbs . values [ i ] ;
1359
- if ( ! crumb . hasOwnProperty ( 'data' ) )
1359
+ if ( ! crumb . hasOwnProperty ( 'data' ) || ! isObject ( crumb . data ) )
1360
1360
continue ;
1361
1361
1362
1362
data = crumb . data ;
Original file line number Diff line number Diff line change @@ -151,6 +151,20 @@ describe('globals', function() {
151
151
}
152
152
} ]
153
153
} ) ;
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
+ } ) ;
154
168
} ) ;
155
169
} ) ;
156
170
You can’t perform that action at this time.
0 commit comments