Improve lint

This commit is contained in:
Bernat Borràs Civil 2025-03-24 19:16:13 +01:00
parent 7a71dd8724
commit 6732f3310c

View file

@ -64,11 +64,11 @@ function setMermaidTheme(siteTheme) {
if (siteTheme === 'dark') themeName = 'dark'; if (siteTheme === 'dark') themeName = 'dark';
// Set custom theme // Set custom theme
if (themeName === 'default' && params.flowchart?.mermaid['theme']) { if (themeName === 'default' && params.flowchart?.mermaid.theme) {
themeName = params.flowchart?.mermaid['theme']; themeName = params.flowchart?.mermaid.theme;
} }
else if (themeName === 'dark' && params.flowchart?.mermaid['darktheme']) { else if (themeName === 'dark' && params.flowchart?.mermaid.darktheme) {
themeName = params.flowchart?.mermaid['darktheme']; themeName = params.flowchart?.mermaid.darktheme;
} }
const mermaidOptions = { theme: themeName }; const mermaidOptions = { theme: themeName };
const options = Object.assign({}, mermaidOptions, { startOnLoad: true }); const options = Object.assign({}, mermaidOptions, { startOnLoad: true });