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 = {
1051
1051
// Make a copy of the arguments to prevent deoptimization
1052
1052
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
1053
1053
var args = new Array ( arguments . length ) ;
1054
- for ( var i = 0 ; i < args . length ; ++ i ) {
1054
+ for ( var i = 0 ; i < args . length ; ++ i ) {
1055
1055
args [ i ] = arguments [ i ] ;
1056
1056
}
1057
1057
1058
+ var fetchInput = args [ 0 ] ;
1058
1059
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
+ }
1059
1070
1060
1071
if ( args [ 1 ] && args [ 1 ] . method ) {
1061
1072
method = args [ 1 ] . method ;
1062
1073
}
1063
1074
1064
1075
var fetchData = {
1065
1076
method : method ,
1066
- url : args [ 0 ] ,
1077
+ url : url ,
1067
1078
status_code : null
1068
1079
} ;
1069
1080
You can’t perform that action at this time.
0 commit comments