From c72f1c354bf3cf4e6801362e94d1feb388e84029 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 9 Mar 2016 16:08:08 -0800 Subject: [PATCH] Reuse existing var --- src/compiler/binder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 2cc48c02947..b038a699b47 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1418,7 +1418,7 @@ namespace ts { else { const parent = node.parent as SourceFile; - if (!isExternalModule(node.parent)) { + if (!isExternalModule(parent)) { file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_in_module_files)); return; }