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 = {
13491349 _trimBreadcrumbs : function ( breadcrumbs ) {
13501350 // known breadcrumb properties with urls
13511351 // 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 ,
13531354 crumb ,
13541355 data ;
13551356
1356- for ( var i = 0 ; i < breadcrumbs . values . length ; i ++ ) {
1357+ for ( var i = 0 ; i < breadcrumbs . values . length ; ++ i ) {
13571358 crumb = breadcrumbs . values [ i ] ;
13581359 if ( ! crumb . hasOwnProperty ( 'data' ) )
13591360 continue ;
13601361
13611362 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 ) ;
13651367 }
13661368 }
13671369 }
You can’t perform that action at this time.
0 commit comments