Skip to content

Commit

Permalink
fix: add temporary fallbacks for reference resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Dec 20, 2024
1 parent f8a13d3 commit 559730f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,17 @@ impl<'a> DocParser<'a> {
Module::Js(_) | Module::Json(_) | Module::Wasm(_) => {
let module_info = self.get_module_info(module.specifier())?;
let exports = module_info.exports(&self.root_symbol);
if name_path.is_empty() {
return Ok(None);
}
let root_name = name_path.remove(0);
let (mut export_name, export) = exports
let Some((mut export_name, export)) = exports
.resolved
.iter()
.find(|(name, _)| &&root_name == name)
.unwrap();
else {
return Ok(None);
};

let export = export.as_resolved_export();
let mut export_symbol = export.module.symbol(export.symbol_id).unwrap();
Expand Down

0 comments on commit 559730f

Please sign in to comment.