File tree 2 files changed +12
-8
lines changed
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>):
105
105
/* Set latest state to scope */
106
106
const transformedState = options . stateTransformer ( newState ) ;
107
107
if ( typeof transformedState !== 'undefined' && transformedState !== null ) {
108
- scope . setContext ( 'state' , { type : 'redux' , value : transformedState } ) ;
108
+ scope . setContext ( 'state' , { state : { type : 'redux' , value : transformedState } } ) ;
109
109
} else {
110
110
scope . setContext ( 'state' , null ) ;
111
111
}
Original file line number Diff line number Diff line change @@ -64,9 +64,11 @@ describe('createReduxEnhancer', () => {
64
64
store . dispatch ( updateAction ) ;
65
65
66
66
expect ( mockSetContext ) . toBeCalledWith ( 'state' , {
67
- type : 'redux' ,
68
- value : {
69
- value : 'updated' ,
67
+ state : {
68
+ type : 'redux' ,
69
+ value : {
70
+ value : 'updated' ,
71
+ } ,
70
72
} ,
71
73
} ) ;
72
74
} ) ;
@@ -88,10 +90,12 @@ describe('createReduxEnhancer', () => {
88
90
Redux . createStore ( ( state = initialState ) => state , enhancer ) ;
89
91
90
92
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
+ } ,
95
99
} ,
96
100
} ) ;
97
101
} ) ;
You can’t perform that action at this time.
0 commit comments