mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
fix: Retain default behavior when rendering errors cases
Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
@@ -97,7 +97,7 @@ mermaid.initialize(config);
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[mermaidAPI.ts:653](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L653)
|
[mermaidAPI.ts:654](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L654)
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|
@@ -491,9 +491,10 @@ const render = async function (
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (config.suppressErrorRendering) {
|
if (config.suppressErrorRendering) {
|
||||||
removeTempElements();
|
removeTempElements();
|
||||||
throw e;
|
} else {
|
||||||
|
errorRenderer.draw(text, id, version);
|
||||||
}
|
}
|
||||||
errorRenderer.draw(text, id, version);
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the d3 node for the svg element
|
// This is the d3 node for the svg element
|
||||||
|
Reference in New Issue
Block a user