Skip to content

Commit

Permalink
Fix progress rendering when % unit
Browse files Browse the repository at this point in the history
  • Loading branch information
kbinani committed Dec 27, 2023
1 parent 73682d5 commit 7a45e48
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/front/component/convert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,10 @@ const progressValue = (
return undefined;
}
if (state.dl && state.error === undefined) {
return { progress: base.count, count: base.count };
return {
progress: base.progress === 1 && base.count === 0 ? 1 : base.count,
count: base.count,
};
}
if (
steps.slice(index + 1).some((s) => {
Expand All @@ -347,7 +350,10 @@ const progressValue = (
return p.progress > 0;
})
) {
return { progress: base.count, count: base.count };
return {
progress: base.progress === 1 && base.count === 0 ? 1 : base.count,
count: base.count,
};
} else {
return base;
}
Expand Down

0 comments on commit 7a45e48

Please sign in to comment.