Skip to content
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

Conversation

pkozlowski-opensource
Copy link
Member

No description provided.

@pkozlowski-opensource pkozlowski-opensource requested a review from a team as a code owner January 30, 2019 11:18
@pkozlowski-opensource pkozlowski-opensource added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release comp: ivy labels Jan 30, 2019
@ngbot ngbot bot added this to the needsTriage milestone Jan 30, 2019
@@ -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 {
Copy link
Member

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 :)

Suggested change
value: RElement | RComment | LContainer | LView | StylingContext | null): boolean {
value: RElement | RComment | LContainer | LView | StylingContext | null): value is LContainer {

Copy link
Contributor

@kara kara left a 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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much clearer 👍

@kara kara added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 30, 2019
@kara
Copy link
Contributor

kara commented Jan 30, 2019

presubmit

@kara kara added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels Jan 30, 2019
@matsko matsko closed this in 71b9d55 Feb 4, 2019
matsko added a commit to matsko/angular that referenced this pull request Feb 4, 2019
matsko added a commit to matsko/angular that referenced this pull request Feb 6, 2019
matsko added a commit that referenced this pull request Feb 6, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants