mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
stateDB classes must be a {} not []
This commit is contained in:
parent
ccd55a0bde
commit
345eaade22
@ -31,9 +31,15 @@ const FILL_KEYWORD = 'fill';
|
|||||||
const BG_FILL = 'bgFill';
|
const BG_FILL = 'bgFill';
|
||||||
const STYLECLASS_SEP = ',';
|
const STYLECLASS_SEP = ',';
|
||||||
|
|
||||||
|
// Returns a new list of classes.
|
||||||
|
// In the future, this can be replaced with a class common to all diagrams.
|
||||||
|
function newClassesList() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
let direction = DEFAULT_DIAGRAM_DIRECTION;
|
let direction = DEFAULT_DIAGRAM_DIRECTION;
|
||||||
let rootDoc = [];
|
let rootDoc = [];
|
||||||
let classes = []; // style classes defined by a classDef
|
let classes = newClassesList(); // style classes defined by a classDef
|
||||||
|
|
||||||
const newDoc = () => {
|
const newDoc = () => {
|
||||||
return {
|
return {
|
||||||
@ -274,7 +280,7 @@ export const clear = function (saveCommon) {
|
|||||||
|
|
||||||
// number of start and end nodes; used to construct ids
|
// number of start and end nodes; used to construct ids
|
||||||
startEndCount = 0;
|
startEndCount = 0;
|
||||||
classes = [];
|
classes = newClassesList();
|
||||||
if (!saveCommon) {
|
if (!saveCommon) {
|
||||||
commonClear();
|
commonClear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user