From e4b386b8156672b82561cb24e32961498a3e3dce Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sun, 6 Aug 2023 19:57:05 +0200 Subject: [PATCH] Fix createHeadTags infinite loop when your themes don't override the headTags property --- src/app/app.component.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 669411d9aaf..08e6fc53337 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -316,14 +316,7 @@ export class AppComponent implements OnInit, AfterViewInit { if (hasValue(parentThemeName)) { // inherit the head tags of the parent theme return this.createHeadTags(parentThemeName); - } - const defaultThemeConfig = getDefaultThemeConfig(); - const defaultThemeName = defaultThemeConfig.name; - if ( - hasNoValue(defaultThemeName) || - themeName === defaultThemeName || - themeName === BASE_THEME_NAME - ) { + } else { // last resort, use fallback favicon.ico return [ this.createHeadTag({ @@ -336,9 +329,6 @@ export class AppComponent implements OnInit, AfterViewInit { }) ]; } - - // inherit the head tags of the default theme - return this.createHeadTags(defaultThemeConfig.name); } return headTagConfigs.map(this.createHeadTag.bind(this));