Skip to content

Commit d4e5b1f

Browse files
committed
fix[eslint-plugin-react-hooks]: Scope can be null
1 parent 1460d67 commit d4e5b1f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ export default {
140140

141141
// Get the current scope.
142142
const scope = scopeManager.acquire(node);
143+
if (!scope) {
144+
return;
145+
}
143146

144147
// Find all our "pure scopes". On every re-render of a component these
145148
// pure scopes may have changes to the variables declared within. So all

0 commit comments

Comments
 (0)