diff --git a/src/app/app.spec.ts b/src/app/app.spec.ts index e7a979b..a446d61 100644 --- a/src/app/app.spec.ts +++ b/src/app/app.spec.ts @@ -115,6 +115,6 @@ describe('App', () => { expect(fixture.nativeElement.textContent).toContain('No encontramos una tienda para este dominio'); expect(document.title).toBe('ShopitFront'); expect(document.head.querySelector('link[rel~="icon"]')?.getAttribute('href')) - .toBe('favicon.ico'); + .toBe("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"); }); }); diff --git a/src/app/app.ts b/src/app/app.ts index c5631f8..e69b2e4 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -9,6 +9,8 @@ import { GlobalLoadingComponent } from './shared/components/global-loading/globa import { ModalHostComponent } from './shared/components/modal-host/modal-host.component'; import { ToastContainerComponent } from './shared/components/toast-container/toast-container.component'; +const EMPTY_FAVICON = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"; + function hexToRgb(hex: string): string { const cleanHex = hex.replace('#', '').trim(); let r = 0, g = 0, b = 0; @@ -66,7 +68,7 @@ export class App { effect(() => { const tenant = this.tenantService.tenant(); const siteTitle = tenant?.site_title?.trim() || 'ShopitFront'; - const faviconHref = tenant?.favicon || 'favicon.ico'; + const faviconHref = tenant?.favicon || EMPTY_FAVICON; this.title.setTitle(siteTitle); diff --git a/src/index.html b/src/index.html index c7d13ff..cc30d1b 100644 --- a/src/index.html +++ b/src/index.html @@ -5,7 +5,7 @@ ShopitFront - +