From e22798261a05a902bbeee5a33d0ee622cddcdce1 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 12 Nov 2014 02:03:46 +1100 Subject: [PATCH] change useless self references to this --- lib/6to5/transformation/transformers/classes.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/6to5/transformation/transformers/classes.js b/lib/6to5/transformation/transformers/classes.js index cbdf3c7f54..a989c96ab7 100644 --- a/lib/6to5/transformation/transformers/classes.js +++ b/lib/6to5/transformation/transformers/classes.js @@ -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) {