Skip to content

Commit 129ef72

Browse files
committed
Use hasProperty instead
1 parent b4d7232 commit 129ef72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9160,7 +9160,7 @@ module ts {
91609160
else {
91619161
var identifierName = (<Identifier>catchClause.variableDeclaration.name).text;
91629162
var locals = catchClause.block.locals;
9163-
if (locals && locals[identifierName]) {
9163+
if (locals && hasProperty(locals, identifierName)) {
91649164
var localSymbol = locals[identifierName]
91659165
if (localSymbol && (localSymbol.flags & SymbolFlags.BlockScopedVariable) !== 0) {
91669166
grammarErrorOnNode(localSymbol.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName);

0 commit comments

Comments
 (0)