diff --git a/crates/oxc_linter/src/rules/eslint/no_obj_calls.rs b/crates/oxc_linter/src/rules/eslint/no_obj_calls.rs index c08ae765119cf..27871f7937a1e 100644 --- a/crates/oxc_linter/src/rules/eslint/no_obj_calls.rs +++ b/crates/oxc_linter/src/rules/eslint/no_obj_calls.rs @@ -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, }