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

Error in startOnLoad documentation? #616

Closed
stanhu opened this issue Jan 18, 2018 · 1 comment
Closed

Error in startOnLoad documentation? #616

stanhu opened this issue Jan 18, 2018 · 1 comment

Comments

@stanhu
Copy link
Contributor

stanhu commented Jan 18, 2018

With mermaid 7.1.2 on npm (https://www.npmjs.com/package/mermaid), adding the startOnLoad as mentioned in #291 (comment) did not make that issue away for me:

  var config = {
        startOnLoad: false
    };
    mermaid.initialize(config);

After testing https://github.com/mermaidjs/mermaid-live-editor and setting a breakpoint in https://github.com/knsv/mermaid/blob/6cd5ffe637d88525b93417bf3954e9c0e5a4deb8/src/mermaid.js#L118-L124, I saw that startOnLoad was not being set properly.

Instead, I had to do this:

mermaid.initialize({
  mermaid: {
     startOnLoad: false
  }
});

Is there a documentation error here?

@tylerlong
Copy link
Collaborator

tylerlong commented Mar 13, 2018

Yes, the documentation is pretty dated.

But I just tested, both code work.

Could you please test the latest mermaid code? Thanks

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
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

No branches or pull requests

2 participants