does adding a new check prevent an error that only seems to happen whenthe frontend is engaged
This commit is contained in:
parent
877424a55a
commit
66a26cc85e
|
@ -148,14 +148,24 @@ function getRetrievalExpressionFromCorrelationProperty(
|
||||||
export function findCorrelationProperties(businessObject, moddle) {
|
export function findCorrelationProperties(businessObject, moddle) {
|
||||||
const root = getRoot(businessObject, moddle);
|
const root = getRoot(businessObject, moddle);
|
||||||
const correlationProperties = [];
|
const correlationProperties = [];
|
||||||
for (const rootElement of root.rootElements) {
|
if (isIterable(root.rootElements)) {
|
||||||
if (rootElement.$type === 'bpmn:CorrelationProperty') {
|
for (const rootElement of root.rootElements) {
|
||||||
correlationProperties.push(rootElement);
|
if (rootElement.$type === 'bpmn:CorrelationProperty') {
|
||||||
|
correlationProperties.push(rootElement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return correlationProperties;
|
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) {
|
export function findCorrelationKeys(businessObject, moddle) {
|
||||||
const root = getRoot(businessObject, moddle);
|
const root = getRoot(businessObject, moddle);
|
||||||
const correlationKeys = [];
|
const correlationKeys = [];
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue