Skip to content

Commit 03d56dc

Browse files
Fix issue #3240
1 parent 5bc571d commit 03d56dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/no-unused-state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ module.exports = {
371371
}
372372
const scope = childScope.variableScope.childScopes.find((x) => x.block === node.value);
373373
const stateArg = node.value.params[1]; // probably "state"
374-
if (!scope.variables) {
374+
if (!scope || !scope.variables) {
375375
return;
376376
}
377377
const argVar = scope.variables.find((x) => x.name === stateArg.name);

0 commit comments

Comments
 (0)