refactor(ivy): clean up RNode retrieval; add better debug support for TNode (#31040)
PR Close #31040
This commit is contained in:

committed by
Miško Hevery

parent
ef75fb8ecd
commit
4495a46b99
@ -16,7 +16,7 @@ import {TElementNode, TNode, TNodeType, TViewNode} from './interfaces/node';
|
||||
import {FLAGS, HOST, LView, LViewFlags, T_HOST} from './interfaces/view';
|
||||
import {destroyLView, renderDetachView} from './node_manipulation';
|
||||
import {findComponentView, getLViewParent} from './util/view_traversal_utils';
|
||||
import {getNativeByTNode} from './util/view_utils';
|
||||
import {getNativeByTNode, getNativeByTNodeOrNull} from './util/view_utils';
|
||||
|
||||
|
||||
|
||||
@ -294,7 +294,7 @@ function collectNativeNodes(lView: LView, parentTNode: TNode, result: any[]): an
|
||||
let tNodeChild = parentTNode.child;
|
||||
|
||||
while (tNodeChild) {
|
||||
const nativeNode = getNativeByTNode(tNodeChild, lView);
|
||||
const nativeNode = getNativeByTNodeOrNull(tNodeChild, lView);
|
||||
nativeNode && result.push(nativeNode);
|
||||
if (tNodeChild.type === TNodeType.ElementContainer) {
|
||||
collectNativeNodes(lView, tNodeChild, result);
|
||||
|
Reference in New Issue
Block a user