Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: abnormal percentage display.
Browse files Browse the repository at this point in the history
  • Loading branch information
wuruii committed Mar 12, 2020
1 parent bde1980 commit 85a5bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/UsageBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const PERCENT_WITH_STATUS = {

function calcPercent(p: number) {
let percent: number | string = 100 * p;
if (percent < 0.0001 && percent > 0) {
if (percent < 0.01 && percent > 0) {
percent = '0.01%';
} else if (percent < 1) {
percent = `${percent.toFixed(3)}%`;
Expand Down

0 comments on commit 85a5bf3

Please sign in to comment.