mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 13:59:54 +02:00
#1542 Fix for secirity config
This commit is contained in:
@@ -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') {
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user