Throw error when detecting diagram type failed and suppressErrorRendering is set

This commit is contained in:
rhysd 2023-04-30 22:29:53 +09:00
parent 2c5d83fab3
commit b4618f9ba1

View File

@ -476,6 +476,9 @@ const render = async function (
try { try {
diag = await getDiagramFromText(text); diag = await getDiagramFromText(text);
} catch (error) { } catch (error) {
if (config.suppressErrorRendering) {
throw error;
}
diag = new Diagram('error'); diag = new Diagram('error');
parseEncounteredException = error; parseEncounteredException = error;
} }