-
-
Notifications
You must be signed in to change notification settings - Fork 9k
fix(compiler-core): When the user uses the key inappropriately in the template, a compilation error should be thrown. #11323
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
…ind has no expression, an error should be thrown
Size ReportBundles
Usages
|
|
What about v-if? |
|
Thanks for the explanation, perhaps we'd add a warning or improve the document |
…template, a compilation error should be thrown
| if ((__DEV__ || !__BROWSER__) && isTemplate) { | ||
| const keyProp = findProp(node, `key`, false, true) | ||
| if (keyProp) { | ||
| context.onError( |
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 shouldn't be thrown an error. I think it should use the user-passed key here, just like normal elements.
see
|
Hi! It looks like vuejs/language-tools#4539 depends on this one, and the problem prevents normal work with Is there any chance that this will be merged soon? |


close #11322