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