move mutator map checking to after loose test

This commit is contained in:
Sebastian McKenzie
2015-01-15 01:09:13 +11:00
parent 4744719040
commit 245fcfe110

View File

@@ -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);
};