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:
Sebastian Markbåge authored and GitHub committed 2023-04-24 19:26:50 -04:00
1 parent 5e5342b100
commit 9ece58ebaa
2 files changed
+5 -2

No files matched your search

@@ -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);
}
+1 -1
View File
@@ -188,7 +188,7 @@ export function updateInput(
if (__DEV__) {
checkAttributeStringCoercion(name, 'name');
}
node.name = name;
node.name = toString(getToStringValue(name));
} else {
node.removeAttribute('name');
}