diff --git a/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts b/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts index 1345e0624..98625510f 100644 --- a/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts +++ b/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts @@ -48,12 +48,13 @@ function drawActorLegend(diagram) { const conf = getConfig().journey; const LEFT_MARGIN = conf.leftMargin; export const draw = function (text, id, version, diagObj) { - const conf = getConfig().journey; - const titleColor = getConfig().themeVariables.titleColor; - const titleFontSize = getConfig().themeVariables.titleFontSize; - const titleFontFamily = getConfig().themeVariables.titleFontFamily; + const configObject = getConfig(); + const conf = configObject.journey; + const titleColor = configObject.themeVariables.titleColor; + const titleFontSize = configObject.themeVariables.titleFontSize; + const titleFontFamily = configObject.themeVariables.titleFontFamily; - const securityLevel = getConfig().securityLevel; + const securityLevel = configObject.securityLevel; // Handle root and Document for when rendering in sandbox mode let sandboxElement; if (securityLevel === 'sandbox') {