Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: uptime overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera authored and sunnygleason committed Oct 3, 2019
1 parent 0b585e5 commit 26aa6d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v2/utils/getUptime.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {compose, getOr, multiply} from 'lodash/fp';

export default compose(
time => parseFloat(time.toFixed(time ? 4 : 2)),
time => (time > 100 ? 100 : parseFloat(time.toFixed(time ? 4 : 2))),
multiply(100),
getOr(0, 'uptime.uptime.[0].percentage'),
);

0 comments on commit 26aa6d9

Please sign in to comment.