mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Go through the toString path for booleanish strings and .name property (#26720)
This is consistent with what we used to do but not what we want to do.
This commit is contained in:
committed by
GitHub
parent
5e5342b100
commit
9ece58ebaa
@@ -685,7 +685,10 @@ function setProp(
|
||||
if (__DEV__) {
|
||||
checkAttributeStringCoercion(value, key);
|
||||
}
|
||||
domElement.setAttribute(key, (value: any));
|
||||
domElement.setAttribute(
|
||||
key,
|
||||
enableTrustedTypesIntegration ? (value: any) : '' + (value: any),
|
||||
);
|
||||
} else {
|
||||
domElement.removeAttribute(key);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ export function updateInput(
|
||||
if (__DEV__) {
|
||||
checkAttributeStringCoercion(name, 'name');
|
||||
}
|
||||
node.name = name;
|
||||
node.name = toString(getToStringValue(name));
|
||||
} else {
|
||||
node.removeAttribute('name');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user