mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): remove duplicate createRenderer call (#47981)
Fixes that we were calling `createRenderer` even though we had one already. This likely wasn't a performance issue since the renderer factory caches the renderer, but it's still better to reuse it to avoid confusion in the future. Fixes #47980. PR Close #47981
This commit is contained in:
parent
ea3374c16b
commit
917816f672
1 changed files with 1 additions and 3 deletions
|
|
@ -169,9 +169,7 @@ export class ComponentFactory<T> extends AbstractComponentFactory<T> {
|
|||
const elementName = this.componentDef.selectors[0][0] as string || 'div';
|
||||
const hostRNode = rootSelectorOrNode ?
|
||||
locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :
|
||||
createElementNode(
|
||||
rendererFactory.createRenderer(null, this.componentDef), elementName,
|
||||
getNamespace(elementName));
|
||||
createElementNode(hostRenderer, elementName, getNamespace(elementName));
|
||||
|
||||
const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :
|
||||
LViewFlags.CheckAlways | LViewFlags.IsRoot;
|
||||
|
|
|
|||
Loading…
Reference in a new issue