From 90cea79b5314c03d04300a72738d8567bd5a9a3a Mon Sep 17 00:00:00 2001 From: KaustubhKumar05 Date: Thu, 29 Feb 2024 17:52:27 +0530 Subject: [PATCH] fix: decimal places --- .../roomkit-react/src/Prebuilt/components/Polls/common/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/roomkit-react/src/Prebuilt/components/Polls/common/utils.ts b/packages/roomkit-react/src/Prebuilt/components/Polls/common/utils.ts index ae98adaa1b..5297e2061a 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Polls/common/utils.ts +++ b/packages/roomkit-react/src/Prebuilt/components/Polls/common/utils.ts @@ -4,7 +4,7 @@ export const getFormattedTime = (milliseconds: number | undefined, precise = tru const totalSeconds = milliseconds / 1000; const hours = Math.floor(totalSeconds / 3600); const minutes = Math.floor((totalSeconds % 3600) / 60); - const seconds = precise ? totalSeconds % 60 : Math.floor(totalSeconds % 60); + const seconds = precise ? (totalSeconds % 60).toFixed(3) : Math.floor(totalSeconds % 60); let formattedTime = ''; if (hours) {