From b6453383cfb06cac3afc492ec88fcad065444664 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sat, 18 Jul 2020 09:37:51 +0200 Subject: [PATCH] #1542 Handling of default values when no theme is set --- .gitignore | 3 ++- src/mermaidAPI.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index eab4c2612..344aa1379 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ dist/sequenceTest.html .vscode/ cypress/platform/current.html -cypress/platform/experimental.html \ No newline at end of file +cypress/platform/experimental.html +local/ \ No newline at end of file diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index 1d15b8f5f..7ff1511d4 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -539,6 +539,8 @@ function initialize(options) { if (options.theme && themes[options.theme]) { // Todo merge with user options options.themeVariables = themes[options.theme]; + } else { + options.themeVariables = themes.default; } const config = typeof options === 'object' ? setSiteConfig(options) : getSiteConfig();