Skip to content

Commit 520c127

Browse files
committed
Do not eagerly stringify value
1 parent 18f5cf7 commit 520c127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-dom/src/client/ReactDOMInput.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export function postMountWrapper(
261261
// When not syncing the value attribute, the value property points
262262
// directly to the React prop. Only assign it if it exists.
263263
if (props.hasOwnProperty('value')) {
264-
const value = toString(getToStringValue(props.value));
264+
const value = getToStringValue(props.value);
265265

266266
// Always assign on buttons so that it is possible to assign an
267267
// empty string to clear button text.
@@ -272,7 +272,7 @@ export function postMountWrapper(
272272
// to the current value in case the browser provided value is not an
273273
// empty string.
274274
if (isButton || value !== node.value) {
275-
node.value = value;
275+
node.value = toString(value);
276276
}
277277
}
278278
} else {

0 commit comments

Comments
 (0)