From 536fdff67bd22fa0176775936b96d3e7b50381cf Mon Sep 17 00:00:00 2001 From: Martin Horzela Date: Thu, 8 Jun 2017 16:30:37 +0200 Subject: [PATCH 1/2] Fix object removal with custom code --- src/shapes/object.class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shapes/object.class.js b/src/shapes/object.class.js index 42f2c25ea77..03524b28816 100644 --- a/src/shapes/object.class.js +++ b/src/shapes/object.class.js @@ -875,7 +875,7 @@ _updateCacheCanvas: function() { if (this.noScaleCache && this.canvas && this.canvas._currentTransform) { var action = this.canvas._currentTransform.action; - if (action.slice(0, 5) === 'scale') { + if (typeof action !== "function" && action.slice(0, 5) === 'scale') { return false; } } From 24493b339d8d74ba5ab2b6bd7482ce5e479e0c56 Mon Sep 17 00:00:00 2001 From: Martin Horzela Date: Fri, 9 Jun 2017 09:47:39 +0200 Subject: [PATCH 2/2] Fix object removal with custom code --- src/shapes/object.class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shapes/object.class.js b/src/shapes/object.class.js index 03524b28816..834f3294d26 100644 --- a/src/shapes/object.class.js +++ b/src/shapes/object.class.js @@ -875,7 +875,7 @@ _updateCacheCanvas: function() { if (this.noScaleCache && this.canvas && this.canvas._currentTransform) { var action = this.canvas._currentTransform.action; - if (typeof action !== "function" && action.slice(0, 5) === 'scale') { + if (action.slice && action.slice(0, 5) === 'scale') { return false; } }