From 7e28144a691886cedd4988a82fe2d54ca8afe4e6 Mon Sep 17 00:00:00 2001 From: Mojtaba Izadmehr Date: Thu, 3 Oct 2019 16:25:06 +0200 Subject: [PATCH] Update packages/eslint-plugin-react-hooks/src/RulesOfHooks.js Co-Authored-By: Luke Kang --- packages/eslint-plugin-react-hooks/src/RulesOfHooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js b/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js index 55399d6f4d70b..51eb3502e42ba 100644 --- a/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js +++ b/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js @@ -117,7 +117,7 @@ export default { function countPathsFromStart(segment, pathHistory) { const {cache} = countPathsFromStart; let paths = cache.get(segment.id); - let pathList = new Set(pathHistory); + const pathList = new Set(pathHistory); // If `pathList` includes the current segment then we've found a cycle! // We need to fill `cyclic` with all segments inside cycle