Skip to content

Commit

Permalink
hotfix: remove panic! from binding resolution (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac authored Jul 4, 2023
1 parent 17a73b1 commit e87445c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/oxc_linter/src/rules/eslint/no_obj_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ fn resolve_global_binding<'a, 'b: 'a>(
let nodes = ctx.nodes();
let symbols = ctx.symbols();
scope.get_binding(scope_id, &ident.name).map_or_else(|| {
panic!("No binding id found, but this IdentifierReference is not a global");
// panic!("No binding id found for {}, but this IdentifierReference
// is not a global", &ident.name);
None
}, |binding_id| {
let decl = nodes.get_node(symbols.get_declaration(binding_id));
let decl_scope = decl.scope_id();
Expand Down

0 comments on commit e87445c

Please sign in to comment.