Skip to content
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

Fix duplicate diagram IDs #801

Merged
merged 8 commits into from
Nov 14, 2019
Merged

Fix duplicate diagram IDs #801

merged 8 commits into from
Nov 14, 2019

Conversation

chipit24
Copy link
Contributor

@chipit24 chipit24 commented Nov 12, 2019

Fixes #774.

Code is already in place for ensuring nodes do not receive duplicate IDs; this PR prevents added nodes from receiving a duplicate diagram ID.

@chipit24 chipit24 self-assigned this Nov 12, 2019
generateNewNodeId(prefix = nodeIdPrefix) {
const id = prefix + this.counter;
this.counter++;
#generateDefinitionId = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to use private properties here instead of private methods as there appears to be bugs with babel-eslint when it comes to using private methods that I could not fix by updating the relevant dependencies. See babel/babel-eslint#728.

@chipit24 chipit24 marked this pull request as ready for review November 13, 2019 21:36
Copy link
Contributor

@lisa-fehr lisa-fehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to work. No other input.

@chipit24 chipit24 merged commit 016efe0 into develop Nov 14, 2019
@chipit24 chipit24 deleted the 774-fix-duplicate-id-bug branch November 14, 2019 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated ID issue
2 participants