diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e614fd918b..1d7e86ff80 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -287,7 +287,7 @@ export class AppComponent implements OnInit, AfterViewInit { } // create new head tags (not yet added to DOM) - const headTagFragment = document.createDocumentFragment(); + const headTagFragment = this.document.createDocumentFragment(); this.createHeadTags(themeName) .forEach(newHeadTag => headTagFragment.appendChild(newHeadTag));