From c7b6ea395126cb271bade693865dfd7bc1c0a52e Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Thu, 12 Sep 2024 18:52:04 +0200 Subject: [PATCH] Avoid setting value for progress with nullish value --- src/diff/index.js | 6 ++++-- test/browser/render.test.js | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/diff/index.js b/src/diff/index.js index 40f17aea14..630e5d330e 100644 --- a/src/diff/index.js +++ b/src/diff/index.js @@ -538,14 +538,16 @@ function diffElementNodes( // despite the attribute not being present. When the attribute // is missing the progress bar is treated as indeterminate. // To fix that we'll always update it when it is 0 for progress elements - (inputValue !== dom[i] || - (nodeType === 'progress' && !inputValue) || + ((inputValue !== dom[i] && nodeType !== 'progress') || + (nodeType === 'progress' && inputValue === 0) || // This is only for IE 11 to fix