Skip to content

Commit 4d4cd3c

Browse files
committed
fix params
1 parent 4467e3a commit 4d4cd3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rules/jsx-no-bind.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ module.exports = {
147147
}
148148

149149
function findVariableViolation(node, name) {
150-
getBlockStatementAncestors().find(
150+
getBlockStatementAncestors(node).find(
151151
(block) => reportVariableViolation(node, name, block.range[0])
152152
);
153153
}
@@ -158,7 +158,7 @@ module.exports = {
158158
},
159159

160160
FunctionDeclaration(node) {
161-
const blockAncestors = getBlockStatementAncestors();
161+
const blockAncestors = getBlockStatementAncestors(node);
162162
const variableViolationType = getNodeViolationType(node);
163163

164164
if (blockAncestors.length > 0 && variableViolationType) {
@@ -170,7 +170,7 @@ module.exports = {
170170
if (!node.init) {
171171
return;
172172
}
173-
const blockAncestors = getBlockStatementAncestors();
173+
const blockAncestors = getBlockStatementAncestors(node);
174174
const variableViolationType = getNodeViolationType(node.init);
175175

176176
const nodeParent = /** @type {import("estree").VariableDeclaration} */(node.parent);

0 commit comments

Comments
 (0)