Skip to content

Commit 702b933

Browse files
committed
convert input value to number on hydration
1 parent 1c454c2 commit 702b933

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/internal/client/dom/elements/bindings

1 file changed

+1
-1
lines changed

packages/svelte/src/internal/client/dom/elements/bindings/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function bind_value(input, get, set = get) {
4545
// If we are hydrating and the value has since changed, then use the update value
4646
// from the input instead.
4747
if (hydrating && input.defaultValue !== input.value) {
48-
set(input.value);
48+
set(is_numberlike_input(input) ? to_number(input.value) : input.value);
4949
return;
5050
}
5151

0 commit comments

Comments
 (0)