Fixed uptime duration calculation, added original response time to chart tooltip for case where only 1 check exists

This commit is contained in:
Alex Holliday committed 2024-07-18 12:56:39 -07:00
1 parent b4b2e3ec56
commit 04e4dc886c
2 files changed
+6 -1

No files matched your search

@@ -124,6 +124,9 @@ const DetailsPage = () => {
break;
}
}
if (latestDownCheck === 0) {
return Date.now() - new Date(checks[checks.length - 1].createdAt);
}
return latestCheck - latestDownCheck;
};