diff options
Diffstat (limited to 'app/assets/javascripts/lib/mermaid.js')
-rw-r--r-- | app/assets/javascripts/lib/mermaid.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/mermaid.js b/app/assets/javascripts/lib/mermaid.js index bbc1d8ae1e1..5e62a023777 100644 --- a/app/assets/javascripts/lib/mermaid.js +++ b/app/assets/javascripts/lib/mermaid.js @@ -1,6 +1,13 @@ import mermaid from 'mermaid'; import { getParameterByName } from '~/lib/utils/url_utility'; +import { resetServiceWorkersPublicPath } from '~/lib/utils/webpack'; +const resetWebpackPublicPath = () => { + window.gon = { relative_url_root: getParameterByName('relativeRootPath') }; + resetServiceWorkersPublicPath(); +}; + +resetWebpackPublicPath(); const setIframeRenderedSize = (h, w) => { const { origin } = window.location; window.parent.postMessage({ h, w }, origin); |