diff --git a/apps/web/graphql/mails/helpers.ts b/apps/web/graphql/mails/helpers.ts index 4d1386302..2c5940626 100644 --- a/apps/web/graphql/mails/helpers.ts +++ b/apps/web/graphql/mails/helpers.ts @@ -88,7 +88,7 @@ export async function createTemplateAndSendMail({ loginLink: `${ctx.address}/login`, courseName: course.title, name: course.creatorName || ctx.subdomain.settings.title || "", - hideCourseLitBranding: ctx.subdomain.settings.hideCourseLitBranding, + hideCourseLitBranding: ctx.subdomain.settings?.hideCourseLitBranding, }); await send({ diff --git a/apps/web/graphql/users/logic.ts b/apps/web/graphql/users/logic.ts index c3f024525..90d54d4fc 100644 --- a/apps/web/graphql/users/logic.ts +++ b/apps/web/graphql/users/logic.ts @@ -200,7 +200,7 @@ export const inviteCustomer = async ( courseName: course.title, loginLink: `${ctx.address}/login`, hideCourseLitBranding: - ctx.subdomain.settings.hideCourseLitBranding, + ctx.subdomain.settings?.hideCourseLitBranding, }); await send({ diff --git a/apps/web/pages/api/auth/code/generate.ts b/apps/web/pages/api/auth/code/generate.ts index 8235058c9..cd0fb8d26 100644 --- a/apps/web/pages/api/auth/code/generate.ts +++ b/apps/web/pages/api/auth/code/generate.ts @@ -40,7 +40,7 @@ export default async function handler( try { const emailBody = pug.render(MagicCodeEmailTemplate, { code, - hideCourseLitBranding: domain.settings.hideCourseLitBranding, + hideCourseLitBranding: domain.settings?.hideCourseLitBranding, }); await send({ to: [sanitizedEmail],