fix(ivy): support ICUs with pipes (#34198)
Prior to this commit, i18n runtime code failed with the exception saying that no provider was found for ChangeDetectorRef for a pipe used in ICU. The problem happened because the underlying `createViewRef` function was not taking into account IcuContainer as a valid TNodeType. This commit updates the `createViewRef` function to return corresponding ViewRef for TNodeType.IcuContainer. PR Close #34198
This commit is contained in:

committed by
Miško Hevery

parent
b712065726
commit
eae541b6e2
@ -408,7 +408,7 @@ function createViewRef(tNode: TNode, lView: LView, isPipe: boolean): ViewEngine_
|
||||
return new ViewRef(componentView, componentView);
|
||||
} else if (
|
||||
tNode.type === TNodeType.Element || tNode.type === TNodeType.Container ||
|
||||
tNode.type === TNodeType.ElementContainer) {
|
||||
tNode.type === TNodeType.ElementContainer || tNode.type === TNodeType.IcuContainer) {
|
||||
// The LView represents the location where the injection is requested from.
|
||||
// We need to locate the containing LView (in case where the `lView` is an embedded view)
|
||||
const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up
|
||||
|
Reference in New Issue
Block a user