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: inherit el with hoisted nodes inside keyed template fragment #2089

Merged
merged 3 commits into from
Sep 14, 2020

Conversation

underfin
Copy link
Member

fix #2080

if (__DEV__ && parentComponent && parentComponent.type.__hmrId) {
traverseStaticChildren(n1, n2)
}
traverseStaticChildren(n1, n2)
Copy link
Member Author

@underfin underfin Sep 10, 2020

Choose a reason for hiding this comment

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

Bug caused here.
Should always inherit el form previous nodes, the logic ignored comment case inside traverseStaticChildren .

@yyx990803
Copy link
Member

Update: only call it when the stable fragment has key + do not traverse recursively.

@yyx990803 yyx990803 merged commit a32870a into vuejs:master Sep 14, 2020
@underfin underfin deleted the template-v-for-has-comment branch September 15, 2020 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v-for on a template which has a comment: throws an error when trying to shuffle the array
2 participants