mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-31 14:16:42 +02:00
Fixed the issue that theme-switch does not work on docs.
This commit is contained in:
@@ -8,7 +8,9 @@ try {
|
||||
}
|
||||
|
||||
export const render = async (id: string, code: string, config: MermaidConfig): Promise<string> => {
|
||||
mermaid.initialize(config);
|
||||
// make a clone of config, so we don't mutate the original
|
||||
const mermaidConfig = { ...config };
|
||||
mermaid.initialize(mermaidConfig);
|
||||
const svg = await mermaid.renderAsync(id, code);
|
||||
return svg;
|
||||
};
|
||||
|
Reference in New Issue
Block a user