diff --git a/src/diagrams/flowchart/flowDb.js b/src/diagrams/flowchart/flowDb.js index b343b3481..e47282964 100644 --- a/src/diagrams/flowchart/flowDb.js +++ b/src/diagrams/flowchart/flowDb.js @@ -224,7 +224,7 @@ const setTooltip = function(ids, tooltip) { const setClickFun = function(_id, functionName) { let id = _id; if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - if (configApi.defaultConfig.securityLevel !== 'loose') { + if (configApi.getConfig().securityLevel !== 'loose') { return; } if (typeof functionName === 'undefined') { diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index 385bbd6f1..cf1a35211 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -211,11 +211,12 @@ const render = function(id, _txt, cb, container) { const graphInit = utils.detectInit(txt); if (graphInit) { configApi.addDirective(graphInit); - } else { - configApi.reset(); - const siteConfig = configApi.getSiteConfig(); - configApi.addDirective(siteConfig); } + // else { + // configApi.reset(); + // const siteConfig = configApi.getSiteConfig(); + // configApi.addDirective(siteConfig); + // } // console.warn('Render fetching config'); const cnf = configApi.getConfig();