File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -760,7 +760,7 @@ function makeRequest(data) {
760760 var img = newImage ( ) ,
761761 src = globalServer + authQueryString + '&sentry_data=' + encodeURIComponent ( JSON . stringify ( data ) ) ;
762762
763- if ( globalOptions . crossOrigin ) {
763+ if ( globalOptions . crossOrigin || globalOptions . crossOrigin === '' ) {
764764 img . crossOrigin = globalOptions . crossOrigin ;
765765 }
766766
Original file line number Diff line number Diff line change @@ -1106,6 +1106,15 @@ describe('globals', function() {
11061106 assert . equal ( imageCache [ 0 ] . crossOrigin , 'something' ) ;
11071107 } ) ;
11081108
1109+ it ( 'should populate crossOrigin if empty string' , function ( ) {
1110+ globalOptions = {
1111+ crossOrigin : ''
1112+ } ;
1113+ makeRequest ( { foo : 'bar' } ) ;
1114+ assert . equal ( imageCache . length , 1 ) ;
1115+ assert . equal ( imageCache [ 0 ] . crossOrigin , '' ) ;
1116+ } ) ;
1117+
11091118 it ( 'should not populate crossOrigin if falsey' , function ( ) {
11101119 globalOptions = {
11111120 crossOrigin : false
You can’t perform that action at this time.
0 commit comments