Skip to content

Commit

Permalink
fix(linter): missing return in no-obj-calls recursion (#4594)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac committed Aug 1, 2024
1 parent 590d795 commit 70b8cfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/rules/eslint/no_obj_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ fn resolve_global_binding<'a, 'b: 'a>(
Some(Expression::Identifier(parent_ident))
if parent_ident.name != ident.name =>
{
resolve_global_binding(parent_ident, decl_scope, ctx)
return resolve_global_binding(parent_ident, decl_scope, ctx)
}
// handles "let a = globalThis.JSON; let b = a; a();"
Some(parent_expr) if parent_expr.is_member_expression() => {
global_this_member(parent_expr.to_member_expression())
return global_this_member(parent_expr.to_member_expression())
}
_ => None,
}
Expand Down

0 comments on commit 70b8cfa

Please sign in to comment.