remove unused nodes.inherits in util.template

This commit is contained in:
Sebastian McKenzie
2014-11-14 09:15:29 +11:00
parent f75f045026
commit 38396dadd5

View File

@@ -123,11 +123,7 @@ exports.template = function (name, nodes, keepExpression) {
template = _.cloneDeep(template);
var inherits = false;
if (nodes) {
inherits = nodes.inherits;
delete nodes.inherits;
if (!_.isEmpty(nodes)) {
traverse(template, function (node) {
if (t.isIdentifier(node) && _.has(nodes, node.name)) {
@@ -150,10 +146,6 @@ exports.template = function (name, nodes, keepExpression) {
if (t.isParenthesizedExpression(node)) node = node.expression;
}
if (inherits) {
node = t.inherits(node, inherits);
}
return node;
};