Skip to content

Vue warn: Duplicate keys detected: '2' #7

@vandroids

Description

@vandroids

Hi!

Got this error in my browser console. Can you please fix it?

Details:
I'm showing multiple success notifications at different times asynchronously (for example, after uploading each of multiple files), probably the problem lies here:

methods: {
            showMe(obj){
                const item = {
                    id: this.list.length,

Seems like this.list.length is not a reliable source for unique ID. Maybe it's better to use RNG so that the problem will completely fly away?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions