make name method helper export a property method instead of a default
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user