Skip to content

Commit

Permalink
Fixed Mermaid not mounted when headline with same name is present
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Mar 2, 2022
1 parent 1bdf22f commit cfa6474
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/base.html
Expand Up @@ -214,7 +214,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.5413a266.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.144dcfcd.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}
Expand Down
Expand Up @@ -68,7 +68,7 @@ let index = 0
* @returns Mermaid scripts observable
*/
function fetchScripts(): Observable<void> {
return typeof mermaid === "undefined"
return typeof mermaid === "undefined" || mermaid instanceof Element
? watchScript("https://unpkg.com/mermaid@8.13.3/dist/mermaid.min.js")
: of(undefined)
}
Expand Down

0 comments on commit cfa6474

Please sign in to comment.