File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>):
105105 /* Set latest state to scope */
106106 const transformedState = options . stateTransformer ( newState ) ;
107107 if ( typeof transformedState !== 'undefined' && transformedState !== null ) {
108- scope . setContext ( 'state' , { type : 'redux' , value : transformedState } ) ;
108+ scope . setContext ( 'state' , { state : { type : 'redux' , value : transformedState } } ) ;
109109 } else {
110110 scope . setContext ( 'state' , null ) ;
111111 }
Original file line number Diff line number Diff line change @@ -64,9 +64,11 @@ describe('createReduxEnhancer', () => {
6464 store . dispatch ( updateAction ) ;
6565
6666 expect ( mockSetContext ) . toBeCalledWith ( 'state' , {
67- type : 'redux' ,
68- value : {
69- value : 'updated' ,
67+ state : {
68+ type : 'redux' ,
69+ value : {
70+ value : 'updated' ,
71+ } ,
7072 } ,
7173 } ) ;
7274 } ) ;
@@ -88,10 +90,12 @@ describe('createReduxEnhancer', () => {
8890 Redux . createStore ( ( state = initialState ) => state , enhancer ) ;
8991
9092 expect ( mockSetContext ) . toBeCalledWith ( 'state' , {
91- type : 'redux' ,
92- value : {
93- superSecret : 'REDACTED' ,
94- value : 123 ,
93+ state : {
94+ type : 'redux' ,
95+ value : {
96+ superSecret : 'REDACTED' ,
97+ value : 123 ,
98+ } ,
9599 } ,
96100 } ) ;
97101 } ) ;
You can’t perform that action at this time.
0 commit comments