mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
#1542 Fix for secirity config
This commit is contained in:
parent
ecea0f90d4
commit
f1836c281c
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user