camunda-bpmn-js 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45681,10 +45681,14 @@
45681
45681
  target = context.parent,
45682
45682
  elements = context.elements;
45683
45683
 
45684
- var canReplace = bpmnRules.canReplace(elements, target);
45684
+ var elementReplacements = reduce(elements, function(replacements, element) {
45685
+ var canReplace = bpmnRules.canReplace([ element ], element.host || element.parent || target);
45685
45686
 
45686
- if (canReplace) {
45687
- this.replaceElements(elements, canReplace.replacements);
45687
+ return canReplace ? replacements.concat(canReplace.replacements) : replacements;
45688
+ }, []);
45689
+
45690
+ if (elementReplacements.length) {
45691
+ this.replaceElements(elements, elementReplacements);
45688
45692
  }
45689
45693
  }, this);
45690
45694