File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1051,19 +1051,30 @@ Raven.prototype = {
10511051 // Make a copy of the arguments to prevent deoptimization
10521052 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
10531053 var args = new Array ( arguments . length ) ;
1054- for ( var i = 0 ; i < args . length ; ++ i ) {
1054+ for ( var i = 0 ; i < args . length ; ++ i ) {
10551055 args [ i ] = arguments [ i ] ;
10561056 }
10571057
1058+ var fetchInput = args [ 0 ] ;
10581059 var method = 'GET' ;
1060+ var url ;
1061+
1062+ if ( typeof fetchInput === 'string' ) {
1063+ url = fetchInput ;
1064+ } else {
1065+ url = fetchInput . url ;
1066+ if ( fetchInput . method ) {
1067+ method = fetchInput . method ;
1068+ }
1069+ }
10591070
10601071 if ( args [ 1 ] && args [ 1 ] . method ) {
10611072 method = args [ 1 ] . method ;
10621073 }
10631074
10641075 var fetchData = {
10651076 method : method ,
1066- url : args [ 0 ] ,
1077+ url : url ,
10671078 status_code : null
10681079 } ;
10691080
You can’t perform that action at this time.
0 commit comments