#1542 Fix for markers in class diagrams

This commit is contained in:
Knut Sveidqvist
2020-07-18 09:57:55 +02:00
parent b6453383cf
commit f7a6241ac0
2 changed files with 3 additions and 3 deletions

View File

@@ -536,11 +536,11 @@ function initialize(options) {
// console.log(`mermaidAPI.initialize: v${pkg.version}`);
// Set default options
if (options.theme && themes[options.theme]) {
if (options && options.theme && themes[options.theme]) {
// Todo merge with user options
options.themeVariables = themes[options.theme];
} else {
options.themeVariables = themes.default;
if (options) options.themeVariables = themes.default;
}
const config = typeof options === 'object' ? setSiteConfig(options) : getSiteConfig();