properly reference method body - fixes #530

This commit is contained in:
Sebastian McKenzie 2015-01-19 08:35:01 +11:00
parent 1c6cb7ce40
commit 8fc7af5480

View File

@ -152,7 +152,7 @@ ReplaceSupers.prototype.getThisReference = function () {
return this.topLevelThisReference;
} else {
var ref = this.topLevelThisReference = this.file.generateUidIdentifier("this");
this.methodNode.body.body.unshift(t.variableDeclaration("var", [
this.methodNode.value.body.body.unshift(t.variableDeclaration("var", [
t.variableDeclarator(this.topLevelThisReference, t.thisExpression())
]));
return ref;