Compare commits

...
2 Commits
Author SHA1 Message Date
Alex van Andel 3d379c65e8 Chore: release v4.6.1 (#17125)
release.yml / release (push) Canceled after 0s
2024-10-15 19:08:07 +00:00
Alex van Andel b1d509ba30 fix: organizationId called on possibly undefined profile array (#17123) 2024-10-15 18:56:23 +00:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@calcom/web",
"version": "4.6.0",
"version": "4.6.1",
"private": true,
"scripts": {
"analyze": "ANALYZE=true next build",
@@ -11,7 +11,7 @@ type ListHandlerInput = {
// This functionality is essentially the same as the teams/list.handler.ts but it's easier for SOC to have it in a separate file.
export const listHandler = async ({ ctx }: ListHandlerInput) => {
const organizationId = ctx.user.organization?.id ?? ctx.user.profiles[0].organizationId;
const organizationId = ctx.user.organization?.id ?? ctx.user.profiles[0]?.organizationId;
if (!organizationId) {
throw new TRPCError({ code: "BAD_REQUEST", message: "You do not belong to an organization" });
}