fix: error
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { forEach, isArray } from '@vben/utils';
|
||||
|
||||
import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil';
|
||||
import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil';
|
||||
import { isEventSubProcess, isExpanded } from 'bpmn-js/lib/util/DiUtil';
|
||||
@@ -407,7 +405,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
|
||||
// delete element entry, only show if allowed by rules
|
||||
let deleteAllowed = rules.allowed('elements.delete', { elements: [element] });
|
||||
|
||||
if (isArray(deleteAllowed)) {
|
||||
if (Array.isArray(deleteAllowed)) {
|
||||
// was the element returned as a deletion candidate?
|
||||
deleteAllowed = deleteAllowed[0] === element;
|
||||
}
|
||||
@@ -435,7 +433,7 @@ function isEventType(eventBo, type, definition) {
|
||||
let isDefinition = false;
|
||||
|
||||
const definitions = eventBo.eventDefinitions || [];
|
||||
forEach(definitions, (def) => {
|
||||
definitions.forEach((def) => {
|
||||
if (def.$type === definition) {
|
||||
isDefinition = true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { some } from '@vben/utils';
|
||||
|
||||
const ALLOWED_TYPES = {
|
||||
FailedJobRetryTimeCycle: [
|
||||
'bpmn:StartEvent',
|
||||
@@ -26,14 +24,14 @@ function exists(element) {
|
||||
function includesType(collection, type) {
|
||||
return (
|
||||
exists(collection) &&
|
||||
some(collection, (element) => {
|
||||
collection.some((element) => {
|
||||
return is(element, type);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function anyType(element, types) {
|
||||
return some(types, (type) => {
|
||||
return types.some((type) => {
|
||||
return is(element, type);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isFunction, isObject, some } from '@vben/utils';
|
||||
import { isFunction, isObject } from '@vben/utils';
|
||||
|
||||
const WILDCARD = '*';
|
||||
|
||||
@@ -113,7 +113,7 @@ function is(element, type) {
|
||||
}
|
||||
|
||||
function isAny(element, types) {
|
||||
return some(types, (t) => {
|
||||
return types.some((t) => {
|
||||
return is(element, t);
|
||||
});
|
||||
}
|
||||
@@ -146,7 +146,7 @@ function isAllowedInParent(property, parent) {
|
||||
}
|
||||
|
||||
// (2) check wether property has parent of allowed type
|
||||
return some(allowedIn, (type) => {
|
||||
return allowedIn.some((type) => {
|
||||
return getParent(parent, type);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { some } from '@vben/utils';
|
||||
|
||||
const ALLOWED_TYPES = {
|
||||
FailedJobRetryTimeCycle: [
|
||||
'bpmn:StartEvent',
|
||||
@@ -26,14 +24,14 @@ function exists(element) {
|
||||
function includesType(collection, type) {
|
||||
return (
|
||||
exists(collection) &&
|
||||
some(collection, (element) => {
|
||||
collection.some((element) => {
|
||||
return is(element, type);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function anyType(element, types) {
|
||||
return some(types, (type) => {
|
||||
return types.some((type) => {
|
||||
return is(element, type);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user