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); } }