mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(linter): fix panic in import/namespace (#4080)
This commit is contained in:
parent
54b3b6c0da
commit
7b2dc3b92b
1 changed files with 11 additions and 10 deletions
|
|
@ -227,16 +227,17 @@ fn check_deep_namespace_for_node(
|
|||
let Some(parent_node) = ctx.nodes().parent_node(node.id()) else {
|
||||
return;
|
||||
};
|
||||
|
||||
let mut namespaces = namespaces.to_owned();
|
||||
namespaces.push(name.into());
|
||||
check_deep_namespace_for_node(
|
||||
parent_node,
|
||||
source,
|
||||
namespaces.as_slice(),
|
||||
module.loaded_modules.get(module_source.as_str()).unwrap().value(),
|
||||
ctx,
|
||||
);
|
||||
if let Some(module_record) = module.loaded_modules.get(module_source.as_str()) {
|
||||
let mut namespaces = namespaces.to_owned();
|
||||
namespaces.push(name.into());
|
||||
check_deep_namespace_for_node(
|
||||
parent_node,
|
||||
source,
|
||||
&namespaces,
|
||||
module_record.value(),
|
||||
ctx,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
check_binding_exported(
|
||||
name,
|
||||
|
|
|
|||
Loading…
Reference in a new issue