From 707257e0206b1117278fa1e289374cf23c0e0d01 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 2 Mar 2020 13:52:35 +0100 Subject: [PATCH 1/3] fix(copy-paste): emit with existing property --- lib/features/copy-paste/ModdleCopy.js | 2 +- test/spec/features/copy-paste/ModdleCopySpec.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/features/copy-paste/ModdleCopy.js b/lib/features/copy-paste/ModdleCopy.js index d879f47c..0332be1c 100644 --- a/lib/features/copy-paste/ModdleCopy.js +++ b/lib/features/copy-paste/ModdleCopy.js @@ -164,7 +164,7 @@ ModdleCopy.prototype.copyElement = function(sourceElement, targetElement, proper var copiedProperty = self.copyProperty(sourceProperty, targetElement, propertyName); var canSetProperty = self._eventBus.fire('moddleCopy.canSetCopiedProperty', { - parent: parent, + parent: targetElement, property: copiedProperty, propertyName: propertyName }); diff --git a/test/spec/features/copy-paste/ModdleCopySpec.js b/test/spec/features/copy-paste/ModdleCopySpec.js index 01b8142c..59c9a3e8 100644 --- a/test/spec/features/copy-paste/ModdleCopySpec.js +++ b/test/spec/features/copy-paste/ModdleCopySpec.js @@ -607,6 +607,12 @@ describe('features/copy-paste/ModdleCopy', function() { }); eventBus.on('moddleCopy.canCopyProperty', HIGH_PRIORITY, function(context) { + + // verify provided properties + expect(context).to.have.property('parent'); + expect(context).to.have.property('property'); + expect(context).to.have.property('propertyName'); + var propertyName = context.propertyName; if (propertyName === 'name') { @@ -630,6 +636,12 @@ describe('features/copy-paste/ModdleCopy', function() { }); eventBus.on('moddleCopy.canSetCopiedProperty', HIGH_PRIORITY, function(context) { + + // verify provided properties + expect(context).to.have.property('parent'); + expect(context).to.have.property('property'); + expect(context).to.have.property('propertyName'); + var property = context.property; if (property === 'foo') { From 7d1875c6c63f383f28e9f3516f9c11736048e860 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 2 Mar 2020 14:12:05 +0100 Subject: [PATCH 2/3] chore(CHANGELOG): update to v6.3.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 500fc5a8..85205592 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen ___Note:__ Yet to be released changes appear here._ +## 6.3.1 + +* `FIX`: prevent editor crash in some strict execution environments ([#1283](https://github.com/bpmn-io/bpmn-js/pull/1283)) + ## 6.3.0 * `FEAT`: generate more generic IDs for new elements ([`035bb0c1`](https://github.com/bpmn-io/bpmn-js/commit/035bb0c1fd01adbaab8a340cb1075aa57736540d)) From bf840367295a2d0d5611bfae7ec35b973357f285 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 2 Mar 2020 14:17:44 +0100 Subject: [PATCH 3/3] 6.3.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c1975ce7..e9a1c530 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "bpmn-js", - "version": "6.3.0", + "version": "6.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 71e2c90f..f3ce3270 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bpmn-js", - "version": "6.3.0", + "version": "6.3.1", "description": "A bpmn 2.0 toolkit and web modeler", "scripts": { "all": "run-s lint test distro test:distro",