File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/svelte/src/internal/client/dom/elements Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' svelte ' : patch
3+ ---
4+
5+ fix: ensure value is correctly set to zero on the progress element
Original file line number Diff line number Diff line change @@ -54,8 +54,12 @@ export function remove_input_defaults(input) {
5454export function set_value ( element , value ) {
5555 // @ts -expect-error
5656 var attributes = ( element . __attributes ??= { } ) ;
57- // @ts -expect-error
58- if ( attributes . value === ( attributes . value = value ) || element . value === value ) return ;
57+ if (
58+ attributes . value === ( attributes . value = value ) ||
59+ // @ts -expect-error <progress> elements report 0 value, but that might not really be 0
60+ ( element . value === value && ( value !== 0 || element . nodeName !== 'PROGRESS' ) )
61+ )
62+ return ;
5963 // @ts -expect-error
6064 element . value = value ;
6165}
You can’t perform that action at this time.
0 commit comments