diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-05-10 23:55:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 23:55:48 +0200 |
commit | e72485fb1776d2ffebd90ff716374edfba42d603 (patch) | |
tree | a5176ee6ee23c0fcbdab1290cff02e68003c0f01 /ext/node/resolution.rs | |
parent | ec67e96a124398a2eb12ed8721076ad0147be113 (diff) |
fix(node): conditional exports edge case (#19082)
Fixes https://github.com/denoland/deno/issues/18743
Diffstat (limited to 'ext/node/resolution.rs')
-rw-r--r-- | ext/node/resolution.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/resolution.rs b/ext/node/resolution.rs index 16720f22c..966491505 100644 --- a/ext/node/resolution.rs +++ b/ext/node/resolution.rs @@ -922,7 +922,7 @@ impl NodeResolver { // emitTrailingSlashPatternDeprecation(); } let pattern_trailer = &key[pattern_index + 1..]; - if package_subpath.len() > key.len() + if package_subpath.len() >= key.len() && package_subpath.ends_with(&pattern_trailer) && pattern_key_compare(best_match, key) == 1 && key.rfind('*') == Some(pattern_index) |