Scheduling infrastructure for absolutely everyone.
fix: slot check (#14917)
sean-brydoncfcf5b168c33
diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.tsindex 804850d0cf6..ed3d2bacd62 100644--- a/packages/trpc/server/routers/viewer/slots/util.ts+++ b/packages/trpc/server/routers/viewer/slots/util.ts@@ -682,7 +682,7 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions): ProloggerWithEventDetails.debug(`Available slots: ${JSON.stringify(computedAvailableSlots)}`);// We only want to run this on single targeted events and not dynamic- if (!computedAvailableSlots.slots && input.usernameList?.length === 1) {+ if (!Object.keys(computedAvailableSlots).length && input.usernameList?.length === 1) {try {await handleNotificationWhenNoSlots({eventDetails: {