diff options
Diffstat (limited to 'tools/eslint/lib/rules/guard-for-in.js')
-rw-r--r-- | tools/eslint/lib/rules/guard-for-in.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/eslint/lib/rules/guard-for-in.js b/tools/eslint/lib/rules/guard-for-in.js index 7e4dfbc43e..bc25b2c9cb 100644 --- a/tools/eslint/lib/rules/guard-for-in.js +++ b/tools/eslint/lib/rules/guard-for-in.js @@ -30,7 +30,7 @@ module.exports = { * If the for-in statement has {}, then the real body is the body * of the BlockStatement. Otherwise, just use body as provided. */ - let body = node.body.type === "BlockStatement" ? node.body.body[0] : node.body; + const body = node.body.type === "BlockStatement" ? node.body.body[0] : node.body; if (body && body.type !== "IfStatement") { context.report(node, "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype."); |