perf(ivy): attempt to coalesce listeners only in presence of directives (#29859)
PR Close #29859
This commit is contained in:

committed by
Alex Rickabaugh

parent
d1d0f4a1ad
commit
6a1441f727
@ -131,6 +131,13 @@ export function getNativeByTNode(tNode: TNode, hostView: LView): RNode {
|
||||
return unwrapRNode(hostView[tNode.index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper function that returns `true` if a given `TNode` has any matching directives.
|
||||
*/
|
||||
export function hasDirectives(tNode: TNode): boolean {
|
||||
return tNode.directiveEnd > tNode.directiveStart;
|
||||
}
|
||||
|
||||
export function getTNode(index: number, view: LView): TNode {
|
||||
ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');
|
||||
ngDevMode && assertLessThan(index, view[TVIEW].data.length, 'wrong index for TNode');
|
||||
|
Reference in New Issue
Block a user