Invert domain check, make default logo work

fix/theme-api-embed
Alex van Andel 2023-04-20 01:01:29 +02:00
parent 6c753290aa
commit 4aed769da4
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
if (!domains) throw new Error("No domains"); if (!domains) throw new Error("No domains");
const [subdomain, domain] = domains; const [subdomain, domain] = domains;
// Only supported on cal.com and cal.dev // Only supported on cal.com and cal.dev
if (!["cal.com", "cal.dev"].includes(domain)) return handleDefaultLogo(req, res, parsedQuery); if (["cal.com", "cal.dev"].includes(domain)) return handleDefaultLogo(req, res, parsedQuery);
// Skip if no subdomain // Skip if no subdomain
if (!subdomain) throw new Error("No subdomain"); if (!subdomain) throw new Error("No subdomain");
// Omit system subdomains // Omit system subdomains