-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
fix: Update the clusterDb assignment from plain objects to Map in v11.12.0 #7104
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
base: develop
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7104 +/- ##
==========================================
- Coverage 3.55% 3.55% -0.01%
==========================================
Files 473 474 +1
Lines 47480 47491 +11
Branches 730 730
==========================================
Hits 1687 1687
- Misses 45793 45804 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
sidharthv96
left a comment
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.
@abroa01 can you add a unit test for this scenario as well?
| for (let id of Object.keys(clusterDb)) { | ||
| const nonClusterChild = clusterDb.get(id).id; |
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 fix does not solve the root cause. Inside the for loop, clusterDb.get is called, which will fail.
This particular instance of clusterDb is created as a Map, so I don't understand why it's failing in Cordova.
Resolves #7006
render() immediately fails with TypeError: id of clusterDb.keys is not a function
Root Cause: Major regression introduced in Mermaid v11.0.0 where clusterDb objects are created as plain objects instead of Map instances, causing .keys() method to be undefined
Change :
Change the clusterDb assignment from plain objects to Map in a for loop