Fix for issue #3428, load the configured diagrams even when initialize has not been called.

This commit is contained in:
Knut Sveidqvist
2022-09-09 13:37:37 +02:00
parent e5212c25f5
commit 0f56c9a85d
2 changed files with 6 additions and 2 deletions

View File

@@ -146,6 +146,10 @@ export const decodeEntities = function (text) {
* @returns {any}
*/
const render = function (id, _txt, cb, container) {
if (!hasLoadedDiagrams) {
addDiagrams();
hasLoadedDiagrams = true;
}
configApi.reset();
let txt = _txt.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;;
const graphInit = utils.detectInit(txt);