perf(ivy): clean up findComponentView for speed (#30453)
PR Close #30453
This commit is contained in:
parent
9ce9561737
commit
e122b44269
|
@ -49,7 +49,7 @@ export function getRootView(componentOrLView: LView | {}): LView {
|
|||
*/
|
||||
export function findComponentView(lView: LView): LView {
|
||||
let rootTNode = lView[T_HOST];
|
||||
while (rootTNode && rootTNode.type === TNodeType.View) {
|
||||
while (rootTNode !== null && rootTNode.type === TNodeType.View) {
|
||||
ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');
|
||||
lView = lView[DECLARATION_VIEW] !;
|
||||
rootTNode = lView[T_HOST];
|
||||
|
|
Loading…
Reference in New Issue