Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 22, 2020
1 parent 60e049d commit f892d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/calculate-uptime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ export const getUptimePercentForSite = async (slug: string): Promise<string> =>
const downtimeSeconds = await getDowntimeSecondsForSite(slug);

// Return a percentage string
return `${Math.min(0, 100 - (downtimeSeconds / totalSeconds) * 100).toFixed(2)}%`;
return `${Math.max(0, 100 - (downtimeSeconds / totalSeconds) * 100).toFixed(2)}%`;
};

0 comments on commit f892d8d

Please sign in to comment.