Updated condition for more readability
This commit is contained in:
parent
78bb276216
commit
2eba10a25b
|
@ -1006,11 +1006,10 @@ namespace ts {
|
|||
return;
|
||||
}
|
||||
// pass through
|
||||
let isConstInvalid = true;
|
||||
case SyntaxKind.VariableStatement:
|
||||
// Check modifiers
|
||||
if (nodes === (<ClassDeclaration | FunctionLikeDeclaration | VariableStatement>parent).modifiers) {
|
||||
return checkModifiers(<NodeArray<Modifier>>nodes, !isConstInvalid);
|
||||
return checkModifiers(<NodeArray<Modifier>>nodes, parent.kind === SyntaxKind.VariableStatement);
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.PropertyDeclaration:
|
||||
|
|
Loading…
Reference in a new issue