@@ -2355,7 +2355,7 @@ describe('ReactHooksWithNoopRenderer', () => {
23552355 return < span prop = "ErrorBoundary fallback" /> ;
23562356 }
23572357 Scheduler . unstable_yieldValue ( 'ErrorBoundary render success' ) ;
2358- return this . props . children ;
2358+ return this . props . children || null ;
23592359 }
23602360 } ;
23612361
@@ -2377,7 +2377,7 @@ describe('ReactHooksWithNoopRenderer', () => {
23772377 Scheduler . unstable_yieldValue (
23782378 'DerivedStateOnlyErrorBoundary render success' ,
23792379 ) ;
2380- return this . props . children ;
2380+ return this . props . children || null ;
23812381 }
23822382 } ;
23832383
@@ -2389,7 +2389,7 @@ describe('ReactHooksWithNoopRenderer', () => {
23892389 }
23902390 render ( ) {
23912391 Scheduler . unstable_yieldValue ( `LogOnlyErrorBoundary render` ) ;
2392- return this . props . children ;
2392+ return this . props . children || null ;
23932393 }
23942394 } ;
23952395 } ) ;
@@ -2551,18 +2551,10 @@ describe('ReactHooksWithNoopRenderer', () => {
25512551
25522552 // @gate new
25532553 it ( 'should use the nearest still-mounted boundary if there are no unmounted boundaries' , ( ) => {
2554- function Conditional ( { showChildren} ) {
2555- if ( showChildren ) {
2556- return < BrokenUseEffectCleanup /> ;
2557- } else {
2558- return null ;
2559- }
2560- }
2561-
25622554 act ( ( ) => {
25632555 ReactNoop . render (
25642556 < LogOnlyErrorBoundary >
2565- < Conditional showChildren = { true } />
2557+ < BrokenUseEffectCleanup />
25662558 </ LogOnlyErrorBoundary > ,
25672559 ) ;
25682560 } ) ;
@@ -2573,11 +2565,7 @@ describe('ReactHooksWithNoopRenderer', () => {
25732565 ] ) ;
25742566
25752567 act ( ( ) => {
2576- ReactNoop . render (
2577- < LogOnlyErrorBoundary >
2578- < Conditional showChildren = { false } />
2579- </ LogOnlyErrorBoundary > ,
2580- ) ;
2568+ ReactNoop . render ( < LogOnlyErrorBoundary /> ) ;
25812569 } ) ;
25822570
25832571 expect ( Scheduler ) . toHaveYielded ( [
0 commit comments