Skip to content

Commit

Permalink
fix error in eszip_wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Sep 28, 2023
1 parent 5a3dfc2 commit ead53e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use deno_graph::source::load_data_url;
use deno_graph::source::CacheInfo;
use deno_graph::source::LoadFuture;
use deno_graph::source::Loader;
use deno_graph::source::ResolveError;
use deno_graph::source::Resolver;
use deno_graph::BuildOptions;
use deno_graph::GraphKind;
Expand Down Expand Up @@ -385,9 +386,11 @@ impl Resolver for GraphResolver {
&self,
specifier: &str,
referrer: &deno_graph::ModuleSpecifier,
) -> Result<deno_graph::ModuleSpecifier, anyhow::Error> {
) -> Result<deno_graph::ModuleSpecifier, ResolveError> {
if let Some(import_map) = &self.0 {
Ok(import_map.resolve(specifier, referrer)?)
import_map
.resolve(specifier, referrer)
.map_err(|err| ResolveError::Other(err.into()))
} else {
Ok(deno_graph::resolve_import(specifier, referrer)?)
}
Expand Down

0 comments on commit ead53e5

Please sign in to comment.