mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08: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:
committed by
Andrew Kushnir
parent
db867fee77
commit
c3bc035f5d
@@ -166,9 +166,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;
|
||||
|
||||
Reference in New Issue
Block a user