Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Commit 52719ff

Browse files
committed
Merge pull request react-bootstrap#531 from YannPl/YannPl-patch-396
[fixed] ProgressBar percentage issue when stacked
2 parents 527e21f + 276c2bc commit 52719ff

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ProgressBar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ const ProgressBar = React.createClass({
2727
},
2828

2929
getPercentage(now, min, max) {
30-
return Math.ceil((now - min) / (max - min) * 100);
30+
let roundPrecision = 1000;
31+
return Math.round(((now - min) / (max - min) * 100) * roundPrecision) / roundPrecision;
3132
},
3233

3334
render() {

0 commit comments

Comments
 (0)