File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -281,9 +281,7 @@ describe('reactTreeWalker', () => {
281281
282282 describe ( 'react' ,  ( )  =>  { 
283283 it ( 'supports new context API' ,  ( )  =>  { 
284-  const  {  Provider,  Consumer }  =  React . createContext ( { 
285-  handler : io  =>  io , 
286-  } ) 
284+  const  {  Provider,  Consumer }  =  React . createContext ( ) 
287285
288286 class  SomeInstance  extends  React . Component  { 
289287 render ( )  { 
@@ -292,7 +290,12 @@ describe('reactTreeWalker', () => {
292290 } 
293291
294292 const  tree  =  ( 
295-  < Provider  value = { {  message : 'This is a provider message'  } } > 
293+  < Provider 
294+  value = { { 
295+  message : 'This is a provider message' , 
296+  handler : io  =>  io , 
297+  } } 
298+  > 
296299 < Consumer > 
297300 { ( {  message,  handler } )  =>  ( 
298301 < strong > 
Original file line number Diff line number Diff line change @@ -116,10 +116,8 @@ export default function reactTreeWalker(
116116 if  ( currentElement . type )  { 
117117 if  ( currentElement . type . _context )  { 
118118 // eslint-disable-next-line no-param-reassign 
119-  currentElement . type . _context . _currentValue  =  { 
120-  ...currentElement . type . _context . _currentValue , 
121-  ...currentElement . props . value , 
122-  } 
119+  currentElement . type . _context . _currentValue  = 
120+  currentElement . props . value 
123121 } 
124122 if  ( currentElement . type . Provider  &&  currentElement . type . Consumer )  { 
125123 const  el  =  currentElement . props . children ( 
                         You can’t perform that action at this time. 
           
                  
0 commit comments