Use push.apply to push multiple elements.

This commit is contained in:
Daniel Rosenwasser 2014-09-23 08:18:37 -07:00
parent be373647d0
commit 2c99556b31

View File

@ -31,9 +31,7 @@ module ts {
childNodes.push(node);
}
else if (node.kind === SyntaxKind.VariableStatement) {
forEach((<VariableStatement>node).declarations, declaration => {
childNodes.push(declaration);
});
childNodes.push.apply(childNodes, (<VariableStatement>node).declarations);
}
}