From ba8b49c7036ab9412b8533ab2919477842df189c Mon Sep 17 00:00:00 2001 From: Ahmad Nassri Date: Wed, 10 Mar 2021 11:39:51 -0500 Subject: [PATCH] fix: correct method calls for deterministic ids Fixes #1870 --- src/mermaid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mermaid.js b/src/mermaid.js index f3db478f4..bde52d2b5 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -78,7 +78,7 @@ const init = function() { mermaidAPI.updateSiteConfig({ gantt: mermaid.ganttConfig }); } - const nextId = utils.initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed).next; + const idGeneratior = utils.initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed) let txt; @@ -92,7 +92,7 @@ const init = function() { continue; } - const id = `mermaid-${nextId()}`; + const id = `mermaid-${idGeneratior.next()}`; // Fetch the graph definition including tags txt = element.innerHTML;