The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fixed favicon requests for empty domain names (#4191)
Sohal Kumar Singh368edf70b566
diff --git a/packages/twenty-front/src/utils/__tests__/utils.test.ts b/packages/twenty-front/src/utils/__tests__/utils.test.tsindex 9fa996f4989..a2b7603181a 100644--- a/packages/twenty-front/src/utils/__tests__/utils.test.ts+++ b/packages/twenty-front/src/utils/__tests__/utils.test.ts@@ -42,8 +42,6 @@ describe('getLogoUrlFromDomainName', () => {});test('should handle undefined input', () => {- expect(getLogoUrlFromDomainName(undefined)).toBe(- 'https://favicon.twenty.com/',- );+ expect(getLogoUrlFromDomainName(undefined)).toBe(undefined);});});diff --git a/packages/twenty-front/src/utils/index.ts b/packages/twenty-front/src/utils/index.tsindex 2bb4bbd2010..63042b0b553 100644--- a/packages/twenty-front/src/utils/index.ts+++ b/packages/twenty-front/src/utils/index.ts@@ -20,5 +20,7 @@ export const getLogoUrlFromDomainName = (domainName?: string,): string | undefined => {const sanitizedDomain = sanitizeURL(domainName);- return `https://favicon.twenty.com/${sanitizedDomain}`;+ return sanitizedDomain+ ? `https://favicon.twenty.com/${sanitizedDomain}`+ : undefined;};