From 2c99556b3122bec68993d09b05156f00459f60d0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 23 Sep 2014 08:18:37 -0700 Subject: [PATCH] Use push.apply to push multiple elements. --- src/services/getScriptLexicalStructureWalker.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/services/getScriptLexicalStructureWalker.ts b/src/services/getScriptLexicalStructureWalker.ts index 7dbfb0fbd14..7013460598f 100644 --- a/src/services/getScriptLexicalStructureWalker.ts +++ b/src/services/getScriptLexicalStructureWalker.ts @@ -31,9 +31,7 @@ module ts { childNodes.push(node); } else if (node.kind === SyntaxKind.VariableStatement) { - forEach((node).declarations, declaration => { - childNodes.push(declaration); - }); + childNodes.push.apply(childNodes, (node).declarations); } }