-
Notifications
You must be signed in to change notification settings - Fork 45
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
Conversation
generateNewNodeId(prefix = nodeIdPrefix) { | ||
const id = prefix + this.counter; | ||
this.counter++; | ||
#generateDefinitionId = () => { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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.