diff --git a/packages/lib/server/getLuckyUser.ts b/packages/lib/server/getLuckyUser.ts index b7b458bda9..26f3f65436 100644 --- a/packages/lib/server/getLuckyUser.ts +++ b/packages/lib/server/getLuckyUser.ts @@ -38,7 +38,7 @@ async function leastRecentlyBookedUser>({ const userIdAndAtCreatedPair = usersWithLastCreated.reduce( (keyValuePair: { [key: number]: Date }, user) => { - keyValuePair[user.id] = user.bookings[0]?.createdAt; + keyValuePair[user.id] = user.bookings[0]?.createdAt || new Date(0); return keyValuePair; }, {}