Fixed the issue that theme-switch does not work on docs.
This commit is contained in:
parent
abc6ee049d
commit
c7471f1755
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue