Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/mermaid.js')
-rw-r--r--app/assets/javascripts/lib/mermaid.js7
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);