-
Notifications
You must be signed in to change notification settings - Fork 24.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ivy): remove query results from destroyed embedded views #28445
fix(ivy): remove query results from destroyed embedded views #28445
Conversation
@@ -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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can let TypeScript narrow the type of value
after this call, would avoid some casts :)
value: RElement | RComment | LContainer | LView | StylingContext | null): boolean { | |
value: RElement | RComment | LContainer | LView | StylingContext | null): value is LContainer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -242,14 +242,17 @@ export function destroyViewTree(rootView: LView): void { | |||
while (viewOrContainer) { | |||
let next: LView|LContainer|null = null; | |||
|
|||
if (viewOrContainer.length >= HEADER_OFFSET) { | |||
if (isLContainer(viewOrContainer)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much clearer 👍
…ngular#28445) This reverts commit 71b9d55.
…ngular#28445) This reverts commit 5ebc0da.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.