File tree 1 file changed +11
-0
lines changed
src/renderers/shared/fiber
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,12 @@ function bailout(
216
216
workInProgress ,
217
217
) ;
218
218
if ( workInProgress === progressedWork ) {
219
+ invariant (
220
+ current === null ||
221
+ current . child === null ||
222
+ workInProgress . child !== current . child ,
223
+ 'Expected child to be a work-in-progress child' ,
224
+ ) ;
219
225
if ( workInProgress . progressedPriority === renderPriority ) {
220
226
// We have progressed work that completed at this level. Because the
221
227
// remaining priority (pendingWorkPriority) is less than the priority
@@ -246,6 +252,11 @@ function bailout(
246
252
) ;
247
253
resetToCurrent ( current , workInProgress , renderPriority ) ;
248
254
}
255
+ } else {
256
+ invariant (
257
+ current !== null && current . child === workInProgress . child ,
258
+ 'Expected child to be the current child' ,
259
+ ) ;
249
260
}
250
261
251
262
// Return null to skip the children and continue on the sibling. If
You can’t perform that action at this time.
0 commit comments