fix(ivy): descend into ICU containers when collecting rootNodes (#33493)

PR Close #33493
This commit is contained in:
Pawel Kozlowski
2019-10-30 14:24:33 +01:00
committed by Andrew Kushnir
parent a5167bd53c
commit 563a507315
2 changed files with 43 additions and 5 deletions

View File

@ -306,7 +306,7 @@ function collectNativeNodes(lView: LView, tNode: TNode | null, result: any[]): a
while (tNode !== null) {
ngDevMode && assertNodeOfPossibleTypes(
tNode, TNodeType.Element, TNodeType.Container, TNodeType.Projection,
TNodeType.ElementContainer);
TNodeType.ElementContainer, TNodeType.IcuContainer);
const lNode = lView[tNode.index];
if (lNode !== null) {
@ -326,9 +326,10 @@ function collectNativeNodes(lView: LView, tNode: TNode | null, result: any[]): a
}
}
if (tNode.type === TNodeType.ElementContainer) {
const tNodeType = tNode.type;
if (tNodeType === TNodeType.ElementContainer || tNodeType === TNodeType.IcuContainer) {
collectNativeNodes(lView, tNode.child, result);
} else if (tNode.type === TNodeType.Projection) {
} else if (tNodeType === TNodeType.Projection) {
const componentView = findComponentView(lView);
const componentHost = componentView[T_HOST] as TElementNode;
const parentView = getLViewParent(componentView);