Skip to content

Commit

Permalink
fix(linter/no-array-index-key): compile error due to it uses a rename…
Browse files Browse the repository at this point in the history
…d API (#7391)

Fix: #6960 (comment)
  • Loading branch information
Dunqing committed Nov 21, 2024
1 parent 7f8747d commit a32f5a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/react/no_array_index_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn check_react_clone_element<'a>(
}

fn find_index_param_name<'a>(node: &'a AstNode, ctx: &'a LintContext) -> Option<&'a str> {
for ancestor in ctx.nodes().iter_parents(node.id()).skip(1) {
for ancestor in ctx.nodes().ancestors(node.id()).skip(1) {
if let AstKind::CallExpression(call_expr) = ancestor.kind() {
let Expression::StaticMemberExpression(expr) = &call_expr.callee else {
return None;
Expand Down

0 comments on commit a32f5a7

Please sign in to comment.