Skip to content

React duplicate key error in DefaultLinkSegmentWidget #1051

@sdurham

Description

@sdurham

I'm not sure the correct fix, but this worked for me in:

/node_modules/@projectstorm/react-diagrams-defaults/dist/link/DefaultLinkSegmentWidget.js

const key = `${Bottom.key}-top`; // Give the duplicated item a unique key
const Top = React.cloneElement(Bottom, Object.assign({ key }, ... rest of current code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions