Use more strict comparison operators.

This commit is contained in:
M M committed 2024-08-31 20:13:34 -07:00
1 parent 7866936d3a
commit 44fd1f8898
1 file changed
+2 -2
+2 -2
View File
@@ -35,10 +35,10 @@ const createCheck = async (checkData) => {
}
if (monitor.uptimePercentage === undefined) {
monitor.uptimePercentage = status ? 1 : 0;
monitor.uptimePercentage = (status === true) ? 1 : 0;
} else {
monitor.uptimePercentage =
(monitor.uptimePercentage * (n - 1) + (status ? 1: 0)) / n;
(monitor.uptimePercentage * (n - 1) + (status === true ? 1: 0)) / n;
}
await monitor.save();