merge fix: get classDefs only if diagram is in CLASSDEF_DIAGRAMS

This commit is contained in:
Ashley Engelund (weedySeaDragon @ github) 2022-11-01 10:12:48 -07:00
parent b20602672e
commit 469d0f87be

View File

@ -181,8 +181,8 @@ export const createCssStyles = (
// classDefs defined in the diagram text
if (classDefs && Object.keys(classDefs).length > 0) {
if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
const htmlLabels = config.htmlLabels || config.flowchart?.htmlLabels;
if (CLASSDEF_DIAGRAMS.includes(graphType)) {
const htmlLabels = config.htmlLabels || config.flowchart?.htmlLabels; // TODO why specifically check the Flowchart diagram config?
const cssHtmlElements = ['> *', 'span']; // TODO make a constant
const cssShapeElements = ['rect', 'polygon', 'ellipse', 'circle']; // TODO make a constant