Skip to content

Commit e4b386b

Browse files
Fix createHeadTags infinite loop when your themes don't override the headTags property
1 parent 873a8e1 commit e4b386b

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/app/app.component.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,7 @@ export class AppComponent implements OnInit, AfterViewInit {
316316
if (hasValue(parentThemeName)) {
317317
// inherit the head tags of the parent theme
318318
return this.createHeadTags(parentThemeName);
319-
}
320-
const defaultThemeConfig = getDefaultThemeConfig();
321-
const defaultThemeName = defaultThemeConfig.name;
322-
if (
323-
hasNoValue(defaultThemeName) ||
324-
themeName === defaultThemeName ||
325-
themeName === BASE_THEME_NAME
326-
) {
319+
} else {
327320
// last resort, use fallback favicon.ico
328321
return [
329322
this.createHeadTag({
@@ -336,9 +329,6 @@ export class AppComponent implements OnInit, AfterViewInit {
336329
})
337330
];
338331
}
339-
340-
// inherit the head tags of the default theme
341-
return this.createHeadTags(defaultThemeConfig.name);
342332
}
343333

344334
return headTagConfigs.map(this.createHeadTag.bind(this));

0 commit comments

Comments
 (0)