From 129ef7222c00706c2cb3fc31893f309db231f934 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Mar 2015 22:56:59 +0100 Subject: [PATCH] Use hasProperty instead --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4281d8a5bd3..98cfac70be3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9160,7 +9160,7 @@ module ts { else { var identifierName = (catchClause.variableDeclaration.name).text; var locals = catchClause.block.locals; - if (locals && locals[identifierName]) { + if (locals && hasProperty(locals, identifierName)) { var localSymbol = locals[identifierName] if (localSymbol && (localSymbol.flags & SymbolFlags.BlockScopedVariable) !== 0) { grammarErrorOnNode(localSymbol.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName);