Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Oct 21, 2024
1 parent 65c7780 commit f0e5f6c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1063,16 +1063,9 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
}
// Bail if path is module directory such as `ipaddr.js`
ctx.with_fully_specified(true);
if cached_path.is_dir(&self.cache.fs, ctx) {
if !cached_path.is_file(&self.cache.fs, ctx) {
ctx.with_fully_specified(false);
return Ok(None);
} else if !cached_path.is_file(&self.cache.fs, ctx) {
if let Ok(path) =
self.load_package_exports(filename.to_string_lossy().as_ref(), "", cached_path, ctx)
{
ctx.with_fully_specified(false);
return Ok(path);
}
}
// Create a meaningful error message.
let dir = path.parent().unwrap().to_path_buf();
Expand Down

0 comments on commit f0e5f6c

Please sign in to comment.