Reuse existing var

This commit is contained in:
Ryan Cavanaugh
2016-03-09 16:08:08 -08:00
parent 14941f26a0
commit c72f1c354b

View File

@@ -1418,7 +1418,7 @@ namespace ts {
else {
const parent = node.parent as SourceFile;
if (!isExternalModule(<SourceFile>node.parent)) {
if (!isExternalModule(parent)) {
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_in_module_files));
return;
}