Skip to content

Commit

Permalink
Don't lower case HTML tags in comparison for built-ins
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Apr 1, 2021
1 parent b9e4c10 commit 26e28a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/server/ReactPartialRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ class ReactDOMServerRenderer {
context: Object,
parentNamespace: string,
): string {
const tag = element.type.toLowerCase();
const tag = element.type;

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

0 comments on commit 26e28a1

Please sign in to comment.