change useless self references to this
This commit is contained in:
parent
d0af8b8d0a
commit
e22798261a
@ -36,9 +36,8 @@ function Class(node, file, scope) {
|
||||
this.instanceMutatorMap = {};
|
||||
this.staticMutatorMap = {};
|
||||
this.hasConstructor = false;
|
||||
|
||||
this.className = node.id || t.identifier(file.generateUid("class", scope));
|
||||
this.superName = node.superClass;
|
||||
this.className = node.id || t.identifier(file.generateUid("class", scope));
|
||||
this.superName = node.superClass;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,16 +125,16 @@ Class.prototype.buildBody = function () {
|
||||
var instanceProps;
|
||||
var staticProps;
|
||||
|
||||
if (!_.isEmpty(self.instanceMutatorMap)) {
|
||||
if (!_.isEmpty(this.instanceMutatorMap)) {
|
||||
var protoId = util.template("prototype-identifier", {
|
||||
CLASS_NAME: className
|
||||
});
|
||||
|
||||
instanceProps = util.buildDefineProperties(self.instanceMutatorMap, protoId);
|
||||
instanceProps = util.buildDefineProperties(this.instanceMutatorMap, protoId);
|
||||
}
|
||||
|
||||
if (!_.isEmpty(self.staticMutatorMap)) {
|
||||
staticProps = util.buildDefineProperties(self.staticMutatorMap, className);
|
||||
if (!_.isEmpty(this.staticMutatorMap)) {
|
||||
staticProps = util.buildDefineProperties(this.staticMutatorMap, className);
|
||||
}
|
||||
|
||||
if (instanceProps || staticProps) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user