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: stop returning when err so diagram can be rendered post error fix #1449

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ad1992
Copy link

@ad1992 ad1992 commented May 14, 2024

📑 Summary

Currently in production if for any reason an error occurs, the diagram gets stuck and isn't rendered even after error is fixed hence I have fixed that in this PR

eg, try with below code and config in prod vs this PR

flowchart TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]
{
"theme": "default",
"maxEdges": "10"

change the config to 2 and change it back to 10 -> In prod the diagrams will not rerender until refresh.

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

Copy link

netlify bot commented May 14, 2024

Deploy Preview for mermaidjs ready!

Name Link
🔨 Latest commit 81d34c8
🔍 Latest deploy log https://app.netlify.com/sites/mermaidjs/deploys/664310b59efd0f00083c8dec
😎 Deploy Preview https://deploy-preview-1449--mermaidjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ad1992
Copy link
Author

ad1992 commented May 14, 2024

cc @sidharthv96

@ad1992
Copy link
Author

ad1992 commented May 18, 2024

friendly reminder @sidharthv96

Comment on lines 64 to 68
if (state.error !== undefined) {
error = true;
errorLines = state.error.toString().split('\n');
return;
}
error = false;
Copy link
Member

Choose a reason for hiding this comment

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

If return is removed, error is set as false immediately. So something else needs to be changed.

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