File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/renderers/shared/fiber Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,6 @@ module.exports = function(
294294 : emptyObject ;
295295 const instance = new ctor ( props , context ) ;
296296 adoptClassInstance ( workInProgress , instance ) ;
297- checkClassInstance ( workInProgress ) ;
298297
299298 // Cache unmasked context so we can avoid recreating masked context unless necessary.
300299 // ReactFiberContext usually updates this cache but can't for newly-created instances.
@@ -310,6 +309,10 @@ module.exports = function(
310309 workInProgress : Fiber ,
311310 priorityLevel : PriorityLevel ,
312311 ) : void {
312+ if ( __DEV__ ) {
313+ checkClassInstance ( workInProgress ) ;
314+ }
315+
313316 const instance = workInProgress . stateNode ;
314317 const state = instance . state || null ;
315318
You can’t perform that action at this time.
0 commit comments