Skip to content

Commit 73d54f5

Browse files
committed
Partially revert type -> elementType
1 parent 93a74f4 commit 73d54f5

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

packages/react-dom/src/server/ReactPartialRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,14 @@ function createOpenTagMarkup(
403403
return ret;
404404
}
405405

406-
function validateRenderResult(child, elementType) {
406+
function validateRenderResult(child, type) {
407407
if (child === undefined) {
408408
invariant(
409409
false,
410410
'%s(...): Nothing was returned from render. This usually means a ' +
411411
'return statement is missing. Or, to render nothing, ' +
412412
'return null.',
413-
getComponentName(elementType) || 'Component',
413+
getComponentName(type) || 'Component',
414414
);
415415
}
416416
}

packages/react-reconciler/src/ReactChildFiber.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function coerceRef(
118118
// TODO: Clean this up once we turn on the string ref warning for
119119
// everyone, because the strict mode case will no longer be relevant
120120
if (returnFiber.mode & StrictMode || warnAboutStringRefs) {
121-
const componentName = getComponentName(returnFiber.elementType) || 'Component';
121+
const componentName =
122+
getComponentName(returnFiber.elementType) || 'Component';
122123
if (!didWarnAboutStringRefs[componentName]) {
123124
if (warnAboutStringRefs) {
124125
warningWithoutStack(

0 commit comments

Comments
 (0)