Skip to content

Commit

Permalink
Merge 4a6056b into b932cd0
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Feb 28, 2023
2 parents b932cd0 + 4a6056b commit 0a80397
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .lycheeignore
Expand Up @@ -9,7 +9,7 @@ https://mkdocs.org/
https://osawards.com/javascript/#nominees
https://osawards.com/javascript/2019

# Timeout error, maybe Twitter has anti-bot defences against GitHub's CI servers?
# Timeout error, maybe Twitter has anti-bot defenses against GitHub's CI servers?
https://twitter.com/mermaidjs_

# Don't check files that are generated during the build via `pnpm docs:code`
Expand Down
2 changes: 1 addition & 1 deletion docs/config/setup/modules/mermaidAPI.md
Expand Up @@ -95,7 +95,7 @@ mermaid.initialize(config);

#### Defined in

[mermaidAPI.ts:659](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L659)
[mermaidAPI.ts:662](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L662)

## Functions

Expand Down
5 changes: 4 additions & 1 deletion packages/mermaid/src/mermaidAPI.ts
Expand Up @@ -558,7 +558,10 @@ const render = async function (
function initialize(options: MermaidConfig = {}) {
// Handle legacy location of font-family configuration
if (options?.fontFamily && !options.themeVariables?.fontFamily) {
options.themeVariables = { fontFamily: options.fontFamily };
if (!options.themeVariables) {
options.themeVariables = {};
}
options.themeVariables.fontFamily = options.fontFamily;
}

// Set default options
Expand Down

0 comments on commit 0a80397

Please sign in to comment.