mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 17:29:54 +02:00
Throw error when detecting diagram type failed and suppressErrorRendering
is set
This commit is contained in:
@@ -476,6 +476,9 @@ const render = async function (
|
||||
try {
|
||||
diag = await getDiagramFromText(text);
|
||||
} catch (error) {
|
||||
if (config.suppressErrorRendering) {
|
||||
throw error;
|
||||
}
|
||||
diag = new Diagram('error');
|
||||
parseEncounteredException = error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user