-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
fix(hydration): handle v-if node mismatch #12801
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
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-ssr
@vue/compiler-dom
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
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.
It seems like this adds a new type of allowable mismatch. Is there any precedent for this type of mismatch?
If we want to allow this then we may need to consider similar cases, like:
Those seem essentially the same to me.
node: Node, | ||
{ props }: VNode, | ||
): boolean { | ||
return isComment(node) && props != null && hasOwn(props, allowMismatchAttr) |
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.
If a node has data-allow-mismatch="class"
then I wouldn't expect it to suppress hydration errors for unexpected comment nodes.
close #12782