fix: imports in HTML

This commit is contained in:
Sidharth Vinod
2022-09-20 22:13:49 +05:30
parent 0a944a5de1
commit dab43da202
6 changed files with 10 additions and 9 deletions

View File

@@ -3,7 +3,8 @@ import mermaid2 from '../../src/mermaid';
/**
* ##contentLoaded Callback function that is called when page is loaded. This functions fetches
* configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the page.
* configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the
* page.
*/
const contentLoaded = function () {
let pos = document.location.href.indexOf('?graph=');
@@ -32,8 +33,8 @@ const contentLoaded = function () {
document.getElementsByTagName('body')[0].appendChild(div);
}
global.mermaid.initialize(graphObj.mermaid);
global.mermaid.init();
mermaid2.initialize(graphObj.mermaid);
mermaid2.init();
}
};