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.instanceMutatorMap = {};
|
||||||
this.staticMutatorMap = {};
|
this.staticMutatorMap = {};
|
||||||
this.hasConstructor = false;
|
this.hasConstructor = false;
|
||||||
|
this.className = node.id || t.identifier(file.generateUid("class", scope));
|
||||||
this.className = node.id || t.identifier(file.generateUid("class", scope));
|
this.superName = node.superClass;
|
||||||
this.superName = node.superClass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,16 +125,16 @@ Class.prototype.buildBody = function () {
|
|||||||
var instanceProps;
|
var instanceProps;
|
||||||
var staticProps;
|
var staticProps;
|
||||||
|
|
||||||
if (!_.isEmpty(self.instanceMutatorMap)) {
|
if (!_.isEmpty(this.instanceMutatorMap)) {
|
||||||
var protoId = util.template("prototype-identifier", {
|
var protoId = util.template("prototype-identifier", {
|
||||||
CLASS_NAME: className
|
CLASS_NAME: className
|
||||||
});
|
});
|
||||||
|
|
||||||
instanceProps = util.buildDefineProperties(self.instanceMutatorMap, protoId);
|
instanceProps = util.buildDefineProperties(this.instanceMutatorMap, protoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_.isEmpty(self.staticMutatorMap)) {
|
if (!_.isEmpty(this.staticMutatorMap)) {
|
||||||
staticProps = util.buildDefineProperties(self.staticMutatorMap, className);
|
staticProps = util.buildDefineProperties(this.staticMutatorMap, className);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instanceProps || staticProps) {
|
if (instanceProps || staticProps) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user