From cc604576f08ee5cffb37fb7c91ac8ee24a869faf Mon Sep 17 00:00:00 2001 From: Bernat Romagosa Date: Fri, 22 Sep 2017 13:08:02 +0200 Subject: [PATCH] fixes #1860 (var refactor issue) --- blocks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks.js b/blocks.js index 5d425235..b89031dd 100644 --- a/blocks.js +++ b/blocks.js @@ -3216,7 +3216,7 @@ BlockMorph.prototype.refactorThisVar = function (justTheTemplate) { // taking care of its lexical scope var receiver = this.scriptTarget(), - oldName = this.blockSpec, + oldName = this.instantiationSpec || this.blockSpec, cpy = this.fullCopy(); cpy.addShadow();