summaryrefslogtreecommitdiff
path: root/cli/node/mod.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-12-05 20:09:31 -0500
committerGitHub <noreply@github.com>2022-12-05 20:09:31 -0500
commit3973ceb634afe7b4f38678efe0394da84d9c60a1 (patch)
treedb4303a739300e9b4eac6bcc382114dae1f28902 /cli/node/mod.rs
parent79285fa83bfbbef55d8afa8f28d11ae4a0b21927 (diff)
fix(npm): dependency types were sometimes not being resolved when package had no types entry (#16958)
Closes #16957
Diffstat (limited to 'cli/node/mod.rs')
-rw-r--r--cli/node/mod.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/cli/node/mod.rs b/cli/node/mod.rs
index 15e9a3702..d0c3ed03f 100644
--- a/cli/node/mod.rs
+++ b/cli/node/mod.rs
@@ -95,15 +95,11 @@ impl NodeResolution {
},
)
}
- maybe_response => {
- let specifier = match maybe_response {
- Some(response) => response.into_url(),
- None => {
- ModuleSpecifier::parse("deno:///missing_dependency.d.ts").unwrap()
- }
- };
- (specifier, MediaType::Dts)
- }
+ Some(resolution) => (resolution.into_url(), MediaType::Dts),
+ None => (
+ ModuleSpecifier::parse("deno:///missing_dependency.d.ts").unwrap(),
+ MediaType::Dts,
+ ),
}
}
}