File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1349,19 +1349,21 @@ Raven.prototype = {
1349
1349
_trimBreadcrumbs : function ( breadcrumbs ) {
1350
1350
// known breadcrumb properties with urls
1351
1351
// TODO: also consider arbitrary prop values that start with (https?)?://
1352
- var urlprops = { to : 1 , from : 1 , url : 1 } ,
1352
+ var urlProps = [ 'to' , 'from' , 'url' ] ,
1353
+ urlProp ,
1353
1354
crumb ,
1354
1355
data ;
1355
1356
1356
- for ( var i = 0 ; i < breadcrumbs . values . length ; i ++ ) {
1357
+ for ( var i = 0 ; i < breadcrumbs . values . length ; ++ i ) {
1357
1358
crumb = breadcrumbs . values [ i ] ;
1358
1359
if ( ! crumb . hasOwnProperty ( 'data' ) )
1359
1360
continue ;
1360
1361
1361
1362
data = crumb . data ;
1362
- for ( var prop in urlprops ) {
1363
- if ( data . hasOwnProperty ( prop ) ) {
1364
- data [ prop ] = truncate ( data [ prop ] , this . _globalOptions . maxUrlLength ) ;
1363
+ for ( var j = 0 ; j < urlProps . length ; ++ j ) {
1364
+ urlProp = urlProps [ j ] ;
1365
+ if ( data . hasOwnProperty ( urlProp ) ) {
1366
+ data [ urlProp ] = truncate ( data [ urlProp ] , this . _globalOptions . maxUrlLength ) ;
1365
1367
}
1366
1368
}
1367
1369
}
You can’t perform that action at this time.
0 commit comments