We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bc571d commit 03d56dcCopy full SHA for 03d56dc
lib/rules/no-unused-state.js
@@ -371,7 +371,7 @@ module.exports = {
371
}
372
const scope = childScope.variableScope.childScopes.find((x) => x.block === node.value);
373
const stateArg = node.value.params[1]; // probably "state"
374
- if (!scope.variables) {
+ if (!scope || !scope.variables) {
375
return;
376
377
const argVar = scope.variables.find((x) => x.name === stateArg.name);
0 commit comments