Skip to content

Commit

Permalink
fix(react-storage): default nullish progress to 100% if status is "co…
Browse files Browse the repository at this point in the history
…mplete" (#6186)

* fix(react-storage): set upload to 100% if status 'complete' but progress nullish

* chore: add comment explaining purpose of change

* chore: add further detail to comment

* chore: update comment to remove specifics which may change

---------

Co-authored-by: dindjarinjs <[email protected]>
  • Loading branch information
jordanvn and dindjarinjs authored Dec 13, 2024
1 parent 27c72b5 commit 85fda63
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ export const getActionViewTableData = <T extends TaskData = TaskData>({
type: 'number',
content: {
value: progress,
displayValue: `${getPercentValue(progress ?? 0)}%`,
displayValue: `${getPercentValue(
// Default progress to 100% if progress value is unavailable but status is recognized as complete
progress ?? status === 'COMPLETE' ? 1 : 0
)}%`,
},
};
}
Expand Down

0 comments on commit 85fda63

Please sign in to comment.