File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export default function(
233233 const instance = workInProgress . stateNode ;
234234 const type = workInProgress . type ;
235235 if ( __DEV__ ) {
236- const name = getComponentName ( workInProgress ) ;
236+ const name = getComponentName ( workInProgress ) || 'Component' ;
237237 const renderPresent = instance . render ;
238238
239239 if ( ! renderPresent ) {
@@ -423,7 +423,7 @@ export default function(
423423 typeof ctor . getDerivedStateFromProps === 'function' &&
424424 state === null
425425 ) {
426- const componentName = getComponentName ( workInProgress ) || 'Unknown ' ;
426+ const componentName = getComponentName ( workInProgress ) || 'Component ' ;
427427 if ( ! didWarnAboutUninitializedState [ componentName ] ) {
428428 warning (
429429 false ,
@@ -575,7 +575,7 @@ export default function(
575575
576576 if ( __DEV__ ) {
577577 if ( partialState === undefined ) {
578- const componentName = getComponentName ( workInProgress ) || 'Unknown ' ;
578+ const componentName = getComponentName ( workInProgress ) || 'Component ' ;
579579 if ( ! didWarnAboutUndefinedDerivedState [ componentName ] ) {
580580 warning (
581581 false ,
You can’t perform that action at this time.
0 commit comments