fix: ensure value is correctly set to zero on the progress element

pull/13924/head
Dominic Gannaway 2 years ago
parent 36896f1080
commit ddc70533cb

@ -56,7 +56,8 @@ export function set_value(element, value) {
var attributes = (element.__attributes ??= {});
if (
attributes.value === (attributes.value = value) ||
// @ts-expect-error <progress> elements report 0 value, but that might not really be 0
// @ts-expect-error
// `progress` elements always need their value set when its `0`
(element.value === value && (value !== 0 || element.nodeName !== 'PROGRESS'))
)
return;

Loading…
Cancel
Save