Skip to content

Commit

Permalink
fix[eslint-plugin-react-hooks]: Scope can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Oct 4, 2024
1 parent 1460d67 commit d4e5b1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export default {

// Get the current scope.
const scope = scopeManager.acquire(node);
if (!scope) {
return;
}

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

0 comments on commit d4e5b1f

Please sign in to comment.