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();