From 245fcfe11021d68e5dbadd6495feaeb2789860b3 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 15 Jan 2015 01:09:13 +1100 Subject: [PATCH] move mutator map checking to after loose test --- .../transformation/transformers/es6-classes.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/6to5/transformation/transformers/es6-classes.js b/lib/6to5/transformation/transformers/es6-classes.js index c31d1787b9..73ff53c5f5 100644 --- a/lib/6to5/transformation/transformers/es6-classes.js +++ b/lib/6to5/transformation/transformers/es6-classes.js @@ -179,13 +179,6 @@ Class.prototype.pushMethod = function (node) { var methodName = node.key; var kind = node.kind; - var mutatorMap = this.instanceMutatorMap; - if (node.static) { - this.hasStaticMutators = true; - mutatorMap = this.staticMutatorMap; - } else { - this.hasInstanceMutators = true; - } if (kind === "") { if (this.isLoose) { @@ -204,6 +197,14 @@ Class.prototype.pushMethod = function (node) { kind = "value"; } + var mutatorMap = this.instanceMutatorMap; + if (node.static) { + this.hasStaticMutators = true; + mutatorMap = this.staticMutatorMap; + } else { + this.hasInstanceMutators = true; + } + util.pushMutatorMap(mutatorMap, methodName, kind, node.computed, node); };