mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-11 19:39:43 +02:00
Use timestamp to generate uniq id
This commit is contained in:
@@ -7,8 +7,6 @@ import he from 'he'
|
|||||||
import mermaidAPI from './mermaidAPI'
|
import mermaidAPI from './mermaidAPI'
|
||||||
import { logger } from './logger'
|
import { logger } from './logger'
|
||||||
|
|
||||||
let nextId = 0
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## init
|
* ## init
|
||||||
* Function that goes through the document to find the chart definitions in there and render them.
|
* Function that goes through the document to find the chart definitions in there and render them.
|
||||||
@@ -87,7 +85,7 @@ const init = function () {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
const id = 'mermaidChart' + nextId++
|
const id = `mermaid-${Date.now()}`
|
||||||
|
|
||||||
// Fetch the graph definition including tags
|
// Fetch the graph definition including tags
|
||||||
txt = element.innerHTML
|
txt = element.innerHTML
|
||||||
|
Reference in New Issue
Block a user