Skip to content

Commit 2eba10a

Browse files
committed
Updated condition for more readability
1 parent 78bb276 commit 2eba10a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,11 +1006,10 @@ namespace ts {
10061006
return;
10071007
}
10081008
// pass through
1009-
let isConstInvalid = true;
10101009
case SyntaxKind.VariableStatement:
10111010
// Check modifiers
10121011
if (nodes === (<ClassDeclaration | FunctionLikeDeclaration | VariableStatement>parent).modifiers) {
1013-
return checkModifiers(<NodeArray<Modifier>>nodes, !isConstInvalid);
1012+
return checkModifiers(<NodeArray<Modifier>>nodes, parent.kind === SyntaxKind.VariableStatement);
10141013
}
10151014
break;
10161015
case SyntaxKind.PropertyDeclaration:

0 commit comments

Comments
 (0)