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

cleanup helper dom elements before rendering #1479

Merged

Conversation

chewnoill
Copy link
Contributor

@chewnoill chewnoill commented Jun 17, 2020

📑 Summary

If MermaidAPI.render crashes it can leave a d div element in the dom which causes future render calls to fail.

Here is a js fiddle reproducing the problem
https://jsfiddle.net/bwstyle/qj8p3vze/19/

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 🔖 targeted develop branch

@knsv
Copy link
Collaborator

knsv commented Jun 19, 2020

Great! Better robustness is appreciated!

Copy link
Collaborator

@knsv knsv left a comment

Choose a reason for hiding this comment

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

👍 For rendering tests

@knsv knsv merged commit e37c7e5 into mermaid-js:develop Jun 19, 2020
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.

2 participants