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