refactor(ivy): remove duplicated TNode utility (#32495)
Before this refactoring we had 2 utility functions to check if a given TNode has matching directives. This PR leaves just one such function (one that does less memory read). PR Close #32495
This commit is contained in:

committed by
Kara Erickson

parent
024765b86a
commit
6674746e86
@ -117,13 +117,6 @@ export function getNativeByTNodeOrNull(tNode: TNode, lView: LView): RNode|null {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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