mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-20 04:34:08 +01:00
Fix for issue #259
This commit is contained in:
@@ -232,7 +232,8 @@ var config = {
|
||||
}]
|
||||
]
|
||||
},
|
||||
classDiagram:{}
|
||||
classDiagram:{},
|
||||
info:{}
|
||||
};
|
||||
|
||||
Logger.setLogLevel(config.logLevel);
|
||||
@@ -475,18 +476,22 @@ var render = function(id, txt, cb, container){
|
||||
};
|
||||
|
||||
exports.render = function (id, text, cb, containerElement) {
|
||||
log.info('APA');
|
||||
if(arguments.length === 1){
|
||||
text = id;
|
||||
id = 'mermaidId0';
|
||||
}
|
||||
try{
|
||||
if(arguments.length === 1){
|
||||
text = id;
|
||||
id = 'mermaidId0';
|
||||
}
|
||||
|
||||
if (typeof document === 'undefined') {
|
||||
// Todo handle rendering serverside using phantomjs
|
||||
}
|
||||
else {
|
||||
// In browser
|
||||
return render(id, text, cb, containerElement);
|
||||
if (typeof document === 'undefined') {
|
||||
// Todo handle rendering serverside using phantomjs
|
||||
}
|
||||
else {
|
||||
// In browser
|
||||
return render(id, text, cb, containerElement);
|
||||
}
|
||||
|
||||
}catch(e){
|
||||
log.warn(e);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user