Skip to content

Commit 2783fdb

Browse files
committed
fix(async-stack): check progress should account for 0
1 parent 0e6679d commit 2783fdb

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@svelte-put/async-stack': patch
3+
---
4+
5+
progress should be checked against null not falsy (can be 0)

packages/async-stack/src/helpers/render-popover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function moveNodeIntoParent(node, parent) {
2020
* @param {import('../stack-item.svelte').StackItem<any>} item
2121
*/
2222
function setProgressAndSpeed(node, item) {
23-
if (!item.progress) return;
23+
if (item.progress === null) return;
2424
node.style.setProperty('--play-progress', item.progress.toString());
2525
node.style.setProperty('--play-speed', (1 - item.progress) * item.config.timeout + 'ms');
2626
}

0 commit comments

Comments
 (0)