make name method helper export a property method instead of a default

This commit is contained in:
Sebastian McKenzie
2015-01-18 18:24:05 +11:00
parent 309d19960f
commit c2b20b18b3
3 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ var traverser = {
}
};
module.exports = function (node, file, scope) {
exports.property = function (node, file, scope) {
var key = t.toComputedKey(node, node.key);
if (!t.isLiteral(key)) return node; // we can't set a function id with this

View File

@@ -195,7 +195,7 @@ Class.prototype.pushMethod = function (node) {
var kind = node.kind;
if (kind === "") {
nameMethod(node, this.file, this.scope);
nameMethod.property(node, this.file, this.scope);
if (this.isLoose) {
// use assignments instead of define properties for loose classes

View File

@@ -7,7 +7,7 @@ exports.Property = function (node, parent, scope, context, file) {
node.method = false;
nameMethod(node, file, scope);
nameMethod.property(node, file, scope);
};
exports.ObjectExpression = function (node) {