Skip to content

Commit

Permalink
Fix createHeadTags infinite loop when your themes don't override the …
Browse files Browse the repository at this point in the history
…headTags property
  • Loading branch information
alexandrevryghem committed Aug 6, 2023
1 parent 873a8e1 commit e4b386b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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));
Expand Down

0 comments on commit e4b386b

Please sign in to comment.