babel-plugin-autobind-class-methods
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -18,6 +18,6 @@ 'use strict'; | ||
this.types = types; | ||
this.path = path; | ||
this.isClassDeclaration = isClassDeclaration; | ||
this.classBody = this.path.get('body'); | ||
this.selfIndentifier = isClassDeclaration ? this.path.node.id : this.types.thisExpression(); | ||
this.classBody = path.get('body'); | ||
this.selfIndentifier = isClassDeclaration ? path.node.id : this.types.thisExpression(); | ||
this.currentPath = path.parentPath.isExportDeclaration() ? path.parentPath : path; | ||
} | ||
@@ -70,3 +70,3 @@ | ||
value: function addBoundMethodExpressions(boundMethodExpressions) { | ||
return this.isClassDeclaration ? this.path.insertAfter(boundMethodExpressions) : this.classBody.pushContainer('body', boundMethodExpressions); | ||
return this.isClassDeclaration ? this.currentPath.insertAfter(boundMethodExpressions) : this.classBody.pushContainer('body', boundMethodExpressions); | ||
} | ||
@@ -73,0 +73,0 @@ }]); |
{ | ||
"name": "babel-plugin-autobind-class-methods", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Babel plugin that binds every class method to \"this\" with hot reload support", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
99140