Skip to content

Commit ddc7053

Browse files
committed
fix: ensure value is correctly set to zero on the progress element
1 parent 36896f1 commit ddc7053

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/svelte/src/internal/client/dom/elements/attributes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export function set_value(element, value) {
5656
var attributes = (element.__attributes ??= {});
5757
if (
5858
attributes.value === (attributes.value = value) ||
59-
// @ts-expect-error <progress> elements report 0 value, but that might not really be 0
59+
// @ts-expect-error
60+
// `progress` elements always need their value set when its `0`
6061
(element.value === value && (value !== 0 || element.nodeName !== 'PROGRESS'))
6162
)
6263
return;

0 commit comments

Comments
 (0)