From f393fd4ad482ee34ffd75daee49bb6fea6946232 Mon Sep 17 00:00:00 2001 From: Patel Divyesh Date: Tue, 22 Aug 2023 16:32:40 +0530 Subject: [PATCH] fix: Resolved Typescript Error in PR #9598 created by @vijeet-shah. (#10871) Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: vijeet-shah <93502358+vijeet-shah@users.noreply.github.com> Co-authored-by: Udit Takkar --- .../getting-started/steps-views/SetupAvailability.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/components/getting-started/steps-views/SetupAvailability.tsx b/apps/web/components/getting-started/steps-views/SetupAvailability.tsx index 257386f93e..12147e2e7d 100644 --- a/apps/web/components/getting-started/steps-views/SetupAvailability.tsx +++ b/apps/web/components/getting-started/steps-views/SetupAvailability.tsx @@ -20,10 +20,11 @@ const SetupAvailability = (props: ISetupAvailabilityProps) => { const { t } = useLocale(); const { nextStep } = props; + const scheduleId = defaultScheduleId === null ? undefined : defaultScheduleId; const queryAvailability = trpc.viewer.availability.schedule.get.useQuery( - { scheduleId: defaultScheduleId! }, + { scheduleId }, { - enabled: !!defaultScheduleId, + enabled: !!scheduleId, } );