diff options
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) |