fix(ivy): remove query results from destroyed embedded views (#28445)

PR Close #28445
This commit is contained in:
Pawel Kozlowski
2019-01-30 12:18:27 +01:00
committed by Matias Niemelä
parent eed59b713a
commit 5ebc0da640
3 changed files with 30 additions and 18 deletions

View File

@ -127,7 +127,8 @@ export function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T>
return (def as ComponentDef<T>).template !== null;
}
export function isLContainer(value: RElement | RComment | LContainer | StylingContext): boolean {
export function isLContainer(
value: RElement | RComment | LContainer | LView | StylingContext | null): boolean {
// Styling contexts are also arrays, but their first index contains an element node
return Array.isArray(value) && value.length === LCONTAINER_LENGTH;
}