diff --git a/packages/twenty-front/src/utils/__tests__/utils.test.ts b/packages/twenty-front/src/utils/__tests__/utils.test.ts index 9fa996f49..a2b760318 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.ts index 2bb4bbd20..63042b0b5 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; };