Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Resolved Typescript Error in PR #9598 created by @vijeet-shah. (#10871)

Patel Divyeshf393fd4ad482
diff --git a/apps/web/components/getting-started/steps-views/SetupAvailability.tsx b/apps/web/components/getting-started/steps-views/SetupAvailability.tsx
index 257386f93e8..12147e2e7d3 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,
}
);