Skip to content

Commit

Permalink
Fix repeat on groups microsoft/vscode#27784
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jul 19, 2017
1 parent 3004beb commit 6e1186d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,12 @@ export default function render(tree, field, formatter) {
}

function run(nodes, formatter, fieldsRenderer) {
return nodes.filter(notGroup).map(node => {
return nodes.map(node => {
const outNode = formatter(new OutputNode(node, fieldsRenderer));
return outNode ? outNode.toString(run(node.children, formatter, fieldsRenderer)) : '';
}).join('');
}

function notGroup(node) {
return !node.isGroup;
}

/**
* Returns fields (tab-stops) model with properly updated indices that won’t
* collide with fields in other nodes of foprmatted tree
Expand Down

0 comments on commit 6e1186d

Please sign in to comment.