From c7fbf4237b24cd67fa7e670afbab23d733c474dc Mon Sep 17 00:00:00 2001 From: Magnus Date: Tue, 10 Nov 2020 14:42:05 +0100 Subject: [PATCH] Merge funket ikke ;__; --- src/Frontend/utils.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Frontend/utils.jsx b/src/Frontend/utils.jsx index 8d1f4f4..1307157 100644 --- a/src/Frontend/utils.jsx +++ b/src/Frontend/utils.jsx @@ -105,8 +105,8 @@ const calculateEndTime = (startTime, minUsed) => { min = "0" + min } let final_hours = (parseInt(hours_min[0]) + hours) % 24; - if (final_hours.toString.length < 2 ) { - final_hours = "0" + final_hours + if (final_hours < 10 ) { + final_hours = "0" + final_hours; } const final = final_hours + ":" + min;