Skip to content

Commit 26e28a1

Browse files
committed
Don't lower case HTML tags in comparison for built-ins
1 parent b9e4c10 commit 26e28a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ class ReactDOMServerRenderer {
13241324
context: Object,
13251325
parentNamespace: string,
13261326
): string {
1327-
const tag = element.type.toLowerCase();
1327+
const tag = element.type;
13281328

13291329
let namespace = parentNamespace;
13301330
if (parentNamespace === HTML_NAMESPACE) {
@@ -1335,7 +1335,7 @@ class ReactDOMServerRenderer {
13351335
if (namespace === HTML_NAMESPACE) {
13361336
// Should this check be gated by parent namespace? Not sure we want to
13371337
// allow <SVG> or <mATH>.
1338-
if (tag !== element.type) {
1338+
if (tag.toLowerCase() !== element.type) {
13391339
console.error(
13401340
'<%s /> is using incorrect casing. ' +
13411341
'Use PascalCase for React components, ' +

0 commit comments

Comments
 (0)