From b00a9579a8645cc96ff5717296a8bcda6d33f2d7 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:16:55 -0700 Subject: [PATCH] Removed unneeded capture for lexical this --- src/compiler/checker.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 500d0dec34..d0af755125 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5855,10 +5855,6 @@ namespace ts { // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); } - else if (node.parserContextFlags & ParserContextFlags.Await) { - // if 'this' is part of an async function, we will need to capture 'this' - needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); - } switch (container.kind) { case SyntaxKind.ModuleDeclaration: