Skip to content

Duplicate keys detected not warned #8832

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

Closed
dejour opened this issue Sep 24, 2018 · 3 comments
Closed

Duplicate keys detected not warned #8832

dejour opened this issue Sep 24, 2018 · 3 comments
Labels
improvement warnings related to development warnings

Comments

@dejour
Copy link
Contributor

dejour commented Sep 24, 2018

Version

2.5.17

Reproduction link

https://codesandbox.io/s/zwm20ozlym

Steps to reproduce

check reproduction url

What is expected?

Duplicate keys detected to be warned

What is actually happening?

Duplicate keys detected not warned


when addVnodes is called, vnodes with same key are not warned

@posva posva added improvement has PR warnings related to development warnings and removed has PR labels Sep 24, 2018
@DanielSanRocha
Copy link
Contributor

Hi, may I try to make this improvement my first contribution? I have already had some situations with duplicated keys in which a warning would have helped.

@posva
Copy link
Member

posva commented Sep 29, 2018

of course, nobody is working on this 🙂

DanielSanRocha added a commit to DanielSanRocha/vue that referenced this issue Oct 1, 2018
…patchVnodes function.

Added a check for duplicated keys in the case that addVnodes is called instead of createChildren or
updateChildren. This cover the case when a empty div is change into a div with a list of childrens
with a duplicated key inside after initial rendering (see issue vuejs#8832).

fix vuejs#8832
DanielSanRocha added a commit to DanielSanRocha/vue that referenced this issue Oct 1, 2018
…warning in the case of patchVno

This test cover the case that a empty div changes to a div with children with repeated keys after
initial load (see issue vuejs#8832).

test vuejs#8832
@DanielSanRocha
Copy link
Contributor

Added a pull request (#8881) with a new test case and a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement warnings related to development warnings
Projects
None yet
Development

No branches or pull requests

3 participants