From 36c97c59fdd541ac7019d4356c979df327346dfb Mon Sep 17 00:00:00 2001 From: Ezra Khairan Permana Date: Sun, 16 Jun 2024 07:37:38 +0700 Subject: [PATCH] fix: typing 1 --- packages/settings/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/settings/src/index.ts b/packages/settings/src/index.ts index 6ae6336e..8e2a6725 100644 --- a/packages/settings/src/index.ts +++ b/packages/settings/src/index.ts @@ -8,11 +8,13 @@ const getTimePermission = () => { const currentTimeIsBiggerThanStart = currentSettings.startTime && - currentTime >= currentSettings.startTime.getTime(); + currentSettings.startTime ? + currentTime >= currentSettings.startTime.getTime() : false; const currentTimeIsSmallerThanEnd = currentSettings.startTime && - currentTime <= currentSettings.endTime.getTime(); + currentSettings.endTime ? + currentTime <= currentSettings.endTime.getTime() : false; return { isPermittedByTime: