does adding a new check prevent an error that only seems to happen whenthe frontend is engaged

This commit is contained in:
danfunk 2023-08-04 14:16:40 -04:00
parent 877424a55a
commit 66a26cc85e
2 changed files with 2997 additions and 3 deletions

View File

@ -148,14 +148,24 @@ function getRetrievalExpressionFromCorrelationProperty(
export function findCorrelationProperties(businessObject, moddle) {
const root = getRoot(businessObject, moddle);
const correlationProperties = [];
for (const rootElement of root.rootElements) {
if (rootElement.$type === 'bpmn:CorrelationProperty') {
correlationProperties.push(rootElement);
if (isIterable(root.rootElements)) {
for (const rootElement of root.rootElements) {
if (rootElement.$type === 'bpmn:CorrelationProperty') {
correlationProperties.push(rootElement);
}
}
}
return correlationProperties;
}
function isIterable(obj) {
// checks for null and undefined
if (obj == null) {
return false;
}
return typeof obj[Symbol.iterator] === 'function';
}
export function findCorrelationKeys(businessObject, moddle) {
const root = getRoot(businessObject, moddle);
const correlationKeys = [];

File diff suppressed because it is too large Load Diff