Skip to content

the string constructor cannot be used as a key #11032

Open
@mightyguava

Description

@mightyguava

Version

2.6.11

Reproduction link

https://codesandbox.io/s/practical-shaw-br23c

Steps to reproduce

Open the codesandbox and you'll see a warning like [Vue warn]: Duplicate keys detected: 'constructor'. This may cause an update error.

Click the "swap" button TWICE to swap the list in the data, triggering the error.

If the literal string "constructor" in the first list is changed for any other string, there are no errors or warnings.

What is expected?

The list should swap between the "first" and "second" list

What is actually happening?

"TypeError: Cannot read property 'key' of undefined"


:( this was a hard bug to track down.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions