Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cleanup
  • Loading branch information
gnoff committed Mar 31, 2023
commit f3b9f31783328ee85cd3739e206b559835c7e09f
Original file line number Diff line number Diff line change
Expand Up @@ -3926,22 +3926,22 @@ function writeStyleResourceAttributeInJS(
return;

// Attribute renames
case 'className':
case 'className': {
attributeName = 'class';
if (__DEV__) {
checkAttributeStringCoercion(value, attributeName);
}
attributeValue = '' + (value: any);
break;

}
// Booleans
case 'hidden':
case 'hidden': {
if (value === false) {
return;
}
attributeValue = '';
break;

}
// Santized URLs
case 'src':
case 'href': {
Expand All @@ -3954,8 +3954,8 @@ function writeStyleResourceAttributeInJS(
}
default: {
if (
// shouldIgnoreAttribute
// We have already filtered out null/undefined and reserved words.
// unrecognized event handlers are not SSR'd and we (apparently)
// use on* as hueristic for these handler props
name.length > 2 &&
(name[0] === 'o' || name[0] === 'O') &&
(name[1] === 'n' || name[1] === 'N')
Expand Down Expand Up @@ -4122,21 +4122,23 @@ function writeStyleResourceAttributeInAttr(
return;

// Attribute renames
case 'className':
case 'className': {
attributeName = 'class';
if (__DEV__) {
checkAttributeStringCoercion(value, attributeName);
}
attributeValue = '' + (value: any);
break;
}

// Booleans
case 'hidden':
case 'hidden': {
if (value === false) {
return;
}
attributeValue = '';
break;
}

// Santized URLs
case 'src':
Expand All @@ -4150,8 +4152,8 @@ function writeStyleResourceAttributeInAttr(
}
default: {
if (
// shouldIgnoreAttribute
// We have already filtered out null/undefined and reserved words.
// unrecognized event handlers are not SSR'd and we (apparently)
// use on* as hueristic for these handler props
name.length > 2 &&
(name[0] === 'o' || name[0] === 'O') &&
(name[1] === 'n' || name[1] === 'N')
Expand Down