handle optional .styles

This commit is contained in:
Yokozuna59
2023-06-14 17:27:04 +03:00
parent 8d60ef6d0a
commit 0c449bbd27

View File

@@ -7,6 +7,7 @@ import { addStylesForDiagram } from '../styles.js';
import { DiagramDefinition, DiagramDetector } from './types.js';
import * as _commonDb from '../commonDb.js';
import { parseDirective as _parseDirective } from '../directiveUtils.js';
import isEmpty from 'lodash-es/isEmpty.js';
/*
Packaging and exposing resources for external diagrams so that they can import
@@ -50,7 +51,9 @@ export const registerDiagram = (
if (detector) {
addDetector(id, detector);
}
if (!isEmpty(diagram.styles)) {
addStylesForDiagram(id, diagram.styles);
}
if (diagram.injectUtils) {
diagram.injectUtils(