Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
ensure paths exact match stop condition
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 11, 2015
1 parent a9e15b3 commit 1900734
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ function getCanonicalName(loader, normalized) {
var wIndex = curPath.indexOf('*');
if (wIndex === -1) {
if (normalized === curPath) {
curMatchLength = curPath.split('/').length;
if (curMatchLength > pathMatchLength) {
pathMatch = p;
pathMatchLength = curMatchLength;
}
// always stop on first exact match
pathMatch = p;
break;
}
}
else {
Expand Down

0 comments on commit 1900734

Please sign in to comment.