@@ -261,7 +261,7 @@ var Raven = {
261
261
captureMessage : function ( msg , options ) {
262
262
// Fire away!
263
263
send (
264
- arrayMerge ( {
264
+ objectMerge ( {
265
265
message : msg
266
266
} , options )
267
267
) ;
@@ -532,7 +532,7 @@ function processException(type, message, fileurl, lineno, frames, options) {
532
532
533
533
// Fire away!
534
534
send (
535
- arrayMerge ( {
535
+ objectMerge ( {
536
536
// sentry.interfaces.Exception
537
537
exception : {
538
538
type : type ,
@@ -546,14 +546,14 @@ function processException(type, message, fileurl, lineno, frames, options) {
546
546
) ;
547
547
}
548
548
549
- function arrayMerge ( arr1 , arr2 ) {
550
- if ( ! arr2 ) {
551
- return arr1 ;
549
+ function objectMerge ( obj1 , obj2 ) {
550
+ if ( ! obj2 ) {
551
+ return obj1 ;
552
552
}
553
- each ( arr2 , function ( key , value ) {
554
- arr1 [ key ] = value ;
553
+ each ( obj2 , function ( key , value ) {
554
+ obj1 [ key ] = value ;
555
555
} ) ;
556
- return arr1 ;
556
+ return obj1 ;
557
557
}
558
558
559
559
function getHttpData ( ) {
@@ -574,7 +574,7 @@ function getHttpData() {
574
574
function send ( data ) {
575
575
if ( ! isSetup ( ) ) return ;
576
576
577
- data = arrayMerge ( {
577
+ data = objectMerge ( {
578
578
project : globalProject ,
579
579
logger : globalOptions . logger ,
580
580
site : globalOptions . site ,
@@ -583,9 +583,9 @@ function send(data) {
583
583
request : getHttpData ( )
584
584
} , data ) ;
585
585
586
- // Merge in the tags and extra separately since arrayMerge doesn't handle a deep merge
587
- data . tags = arrayMerge ( globalOptions . tags , data . tags ) ;
588
- data . extra = arrayMerge ( globalOptions . extra , data . extra ) ;
586
+ // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
587
+ data . tags = objectMerge ( globalOptions . tags , data . tags ) ;
588
+ data . extra = objectMerge ( globalOptions . extra , data . extra ) ;
589
589
590
590
// If there are no tags/extra, strip the key from the payload alltogther.
591
591
if ( isEmptyObject ( data . tags ) ) delete data . tags ;
0 commit comments