Skip to content

Commit

Permalink
Fixes jshint#3455
Browse files Browse the repository at this point in the history
Only issue error E012 if a variable name has been given in the for-loop
  • Loading branch information
stvcisco committed Mar 27, 2020
1 parent b6c4518 commit 2916d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jshint.js
Expand Up @@ -5219,7 +5219,7 @@ var JSHINT = (function() {
}
nolinebreak(state.tokens.curr);
advance(";");
if (decl) {
if (decl && decl.first && decl.first[0]) {
if (decl.value === "const" && !decl.hasInitializer) {
warning("E012", decl, decl.first[0].value);
}
Expand Down

0 comments on commit 2916d01

Please sign in to comment.