From 7ff9be7c8a56affb6452048d878c07289225501c Mon Sep 17 00:00:00 2001 From: Martin Stamm Date: Fri, 18 Feb 2022 11:52:37 +0100 Subject: [PATCH] fix(ES6): replace `array.includes` with es5 equivalent --- lib/features/drilldown/SubprocessCompatibility.js | 2 +- .../modeling/behavior/ToggleCollapseConnectionBehaviour.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/features/drilldown/SubprocessCompatibility.js b/lib/features/drilldown/SubprocessCompatibility.js index 5aa57b8a..5d8d2eee 100644 --- a/lib/features/drilldown/SubprocessCompatibility.js +++ b/lib/features/drilldown/SubprocessCompatibility.js @@ -97,7 +97,7 @@ SubprocessCompatibility.prototype.createNewDiagrams = function(plane) { var parent = element.parent; // parent is expanded, get nearest collapsed parent - while (parent && !collapsedElements.includes(parent)) { + while (parent && collapsedElements.indexOf(parent) === -1) { parent = parent.$parent; } diff --git a/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js b/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js index 7f920d67..b1cb182d 100644 --- a/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js +++ b/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js @@ -48,7 +48,7 @@ export default function ToggleCollapseConnectionBehaviour( function handleConnection(c, incoming) { - if (allChildren.includes(c.source) && allChildren.includes(c.target)) { + if (allChildren.indexOf(c.source) !== -1 && allChildren.indexOf(c.target) !== -1) { return; }