Skip to content

Commit ab6d336

Browse files
committed
The comment that explains what is really going on
1 parent f1b1adf commit ab6d336

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -919,12 +919,7 @@ function pushStartTextArea(
919919
children.length <= 1,
920920
'<textarea> can only have at most one child.',
921921
);
922-
// TODO: remove the coercion and the DEV check below because it will
923-
// always be overwritten by the coercion several lines below it. #22309
924-
if (__DEV__) {
925-
checkHtmlStringCoercion(children[0]);
926-
}
927-
value = '' + children[0];
922+
// Fall through. `'' + children` is same as `'' + children[0]` for 1-element arrays
928923
}
929924
if (__DEV__) {
930925
checkHtmlStringCoercion(children);

0 commit comments

Comments
 (0)