Commit a4bac572 authored by Stan Hu's avatar Stan Hu
Browse files

Fix Mermaid drawings not loading on some browsers

As mentioned in https://github.com/knsv/mermaid/issues/291#issuecomment-287673609, the
parameter should be `startOnLoad` instead of `loadOnStart`. In addition, `mermaid.initialize()`
expects to see `startOnLoad` in the `mermaid` hash:

https://github.com/knsv/mermaid/blob/6cd5ffe637d88525b93417bf3954e9c0e5a4deb8/src/mermaid.js#L118

Closes #42052
parent 400f950df21a
...@@ -19,7 +19,11 @@ export default function renderMermaid($els) { ...@@ -19,7 +19,11 @@ export default function renderMermaid($els) {
import(/* webpackChunkName: 'mermaid' */ 'blackst0ne-mermaid').then((mermaid) => { import(/* webpackChunkName: 'mermaid' */ 'blackst0ne-mermaid').then((mermaid) => {
mermaid.initialize({ mermaid.initialize({
loadOnStart: false, // mermaid core options
mermaid: {
startOnLoad: false,
},
// mermaidAPI options
theme: 'neutral', theme: 'neutral',
}); });
......
---
title: Fix Mermaid drawings not loading on some browsers
merge_request:
author:
type: fixed
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment