diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-08-29 19:15:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 19:15:20 +0200 |
commit | 2851a980723f27c245e6e3790a53dd26136f225f (patch) | |
tree | 0ce2420293ba50266dc24be7f4f0ea2e0508c036 /ext/node | |
parent | ea838d27a2b1bd7b396843b645aff544f84265c1 (diff) |
fix(npm): conditional exports with wildcards (#15652)
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/resolution.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/node/resolution.rs b/ext/node/resolution.rs index b839d4144..b77e6f690 100644 --- a/ext/node/resolution.rs +++ b/ext/node/resolution.rs @@ -451,7 +451,7 @@ pub fn package_exports_resolve( for key in package_exports.keys() { let pattern_index = key.find('*'); if let Some(pattern_index) = pattern_index { - let key_sub = &key[0..=pattern_index]; + let key_sub = &key[0..pattern_index]; if package_subpath.starts_with(key_sub) { // When this reaches EOL, this can throw at the top of the whole function: // @@ -472,7 +472,7 @@ pub fn package_exports_resolve( best_match = key; best_match_subpath = Some( package_subpath - [pattern_index..=(package_subpath.len() - pattern_trailer.len())] + [pattern_index..(package_subpath.len() - pattern_trailer.len())] .to_string(), ); } |