mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
#3680 Add font familiy in a way that does remove other configuration
This commit is contained in:
parent
752a6b2cb0
commit
e86d7894f5
@ -455,10 +455,11 @@ const handleDirective = function (p: any, directive: any, type: string): void {
|
||||
/** @param {MermaidConfig} options */
|
||||
async function initialize(options: MermaidConfig) {
|
||||
// Handle legacy location of font-family configuration
|
||||
if (options?.fontFamily) {
|
||||
if (!options.themeVariables?.fontFamily) {
|
||||
options.themeVariables = { fontFamily: options.fontFamily };
|
||||
if (options.fontFamily) {
|
||||
if (!options.themeVariables) {
|
||||
options.themeVariables = {};
|
||||
}
|
||||
options.themeVariables.fontFamily = options.fontFamily;
|
||||
}
|
||||
|
||||
// Set default options
|
||||
|
Loading…
x
Reference in New Issue
Block a user