File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ const ProvConContainer = (props: ProvConContainerProps): JSX.Element => {
4545 return null ;
4646 } ;
4747 const contextProvidersOnly = keepContextAndProviderNodes ( currentSnapshot ) ;
48+ console . log ( 'before' , contextProvidersOnly ) ;
4849
4950 const filterComponentProperties = ( node : any ) : FilteredNode | null => {
5051 if ( ! node ) return null ;
@@ -74,7 +75,7 @@ const ProvConContainer = (props: ProvConContainerProps): JSX.Element => {
7475 if ( node . props && ! isEmptyObject ( node . props ) ) {
7576 Object . entries ( node . props ) . forEach ( ( [ key , value ] ) => {
7677 if ( ! isEmptyObject ( value ) ) {
77- filteredNode [ `prop_ ${ key } ` ] = value ;
78+ filteredNode [ `${ key } ` ] = value ;
7879 }
7980 } ) ;
8081 }
@@ -108,12 +109,8 @@ const ProvConContainer = (props: ProvConContainerProps): JSX.Element => {
108109 }
109110
110111 // Flatten root level hooksState if it exists
111- if ( node . hooksState && ! isEmptyObject ( node . hooksState ) ) {
112- Object . entries ( node . hooksState ) . forEach ( ( [ key , value ] ) => {
113- if ( ! isEmptyObject ( value ) ) {
114- filteredNode [ `hook_${ key } ` ] = value ;
115- }
116- } ) ;
112+ if ( node . componentData . hooksState && ! isEmptyObject ( node . componentData . hooksState ) ) {
113+ filteredNode [ 'State' ] = node . componentData . hooksState ;
117114 }
118115
119116 // Process children and add them using the node's name as the key
You can’t perform that action at this time.
0 commit comments