fix(ivy): extend assertion in directiveInject
function to support IcuContainers (#33832)
Prior to this commit the assert that we have in `directiveInject` (assert introduced recently) didn't include IcuContainer TNode type and as a result, the error is thrown in case pipes with dependencies are used inside ICUs. This commit extends the assert to allow for IcuContainer TNode types. PR Close #33832
This commit is contained in:

committed by
Alex Rickabaugh

parent
a61fb76d51
commit
84524583e9
@ -47,7 +47,8 @@ export function ɵɵdirectiveInject<T>(
|
||||
if (lView == null) return ɵɵinject(token, flags);
|
||||
const tNode = getPreviousOrParentTNode();
|
||||
ngDevMode && assertNodeOfPossibleTypes(
|
||||
tNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer);
|
||||
tNode, TNodeType.Container, TNodeType.Element, TNodeType.ElementContainer,
|
||||
TNodeType.IcuContainer);
|
||||
return getOrCreateInjectable<T>(
|
||||
tNode as TDirectiveHostNode, lView, resolveForwardRef(token), flags);
|
||||
}
|
||||
|
Reference in New Issue
Block a user