summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-01-17 14:56:25 -0800
committerStan Hu <stanhu@gmail.com>2018-01-17 20:12:48 -0800
commitb1261ad942946102da28a5df1247208d2bfb57e7 (patch)
treef13c8bdc0975072528c0f12fb5bff796ff761e35 /app
parent3228ac06a019c9126b965ff32e354d10011a4f76 (diff)
downloadgitlab-ce-b1261ad942946102da28a5df1247208d2bfb57e7.tar.gz
Fix Mermaid drawings not loading on some browserssh-fix-mermaid-start-on-load-typo
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
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/render_mermaid.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/render_mermaid.js b/app/assets/javascripts/render_mermaid.js
index b7cde6fb092..31c7a772cf4 100644
--- a/app/assets/javascripts/render_mermaid.js
+++ b/app/assets/javascripts/render_mermaid.js
@@ -19,7 +19,11 @@ export default function renderMermaid($els) {
import(/* webpackChunkName: 'mermaid' */ 'blackst0ne-mermaid').then((mermaid) => {
mermaid.initialize({
- loadOnStart: false,
+ // mermaid core options
+ mermaid: {
+ startOnLoad: false,
+ },
+ // mermaidAPI options
theme: 'neutral',
});