summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/node/resolution.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/node/resolution.rs b/ext/node/resolution.rs
index c94b55f54..84d8ba39d 100644
--- a/ext/node/resolution.rs
+++ b/ext/node/resolution.rs
@@ -878,15 +878,15 @@ impl NodeResolver {
last_error = None;
continue;
}
- Err(e) => match e.as_kind() {
- PackageTargetResolveErrorKind::InvalidPackageTarget(_) => {
+ Err(e) => {
+ // todo(dsherret): add codes to each error and match on that instead
+ if e.to_string().starts_with("[ERR_INVALID_PACKAGE_TARGET]") {
last_error = Some(e);
continue;
- }
- _ => {
+ } else {
return Err(e);
}
- },
+ }
}
}
if last_error.is_none() {